This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

automatic hyperlink with XSLT ?


Hi.

The following example (from W3C, at http://www.w3.org/TR/xslt#key)
doesn't run on my PC (WinNT4, MIE5). Anybody can help me ?

XML Doc:
<?xml version="1.0" encoding="UTF-8"?>
<hyperlien>
  <prototype name="key" return-type="node-set">
    <arg type="string"/>
    <arg type="object"/>
  </prototype>
  <function>cle</function>
</hyperlien>

XSLT :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  <html>
    <head>
      <title>Hyperlinks vwith XSLT</title>
    </head>
    <body>
      <xsl:key match="prototype" name="func" use="@name"/>
      <xsl:template match="function">
        <b>
          <a href="{generate-id(key('func',.))}">
            <xsl:apply-templates/>
          </a>
        </b>
      </xsl:template>
      <xsl:template match="prototype">
        <p>
          <a name="{generate-id()}">
            <b>function:</b>
          </a>
        </p>
      </xsl:template>
    </body>
  </html>
</xsl:stylesheet>

Result : Nothing !
I should obtain a cross-reference with a generated anchor... I guess



+----------------+---------------------------------------------------+
|   ATTENTION !   Actuellement je suis a Sydney (cf. email plus bas) | 
+----------------+---------------------------------------------------+ 
|    /\ /\ /\    |  Jean-Claude TARBY                                | 
|   /  /  /  \   |  Associate Professor                              |
|  /  /  /    \  |  TRIGONE Laboratory  - CUEEP Institute            | 
|  \  \  \    /  |  University Lille 1                               | 
|   \  \  \  /   |  59655 Villeneuve d'Ascq Cedex   -   FRANCE       | 
|    \/ \/ \/    |  Phone   : +33 (0)3.20.43.32.62                   | 
|                |  Fax     : +33 (0)3.20.43.32.79                   | 
|    TRIGONE     |  E-mail  : Jean-Claude.Tarby@univ-lille1.fr       | 
|    SYDNEY      |  E-mail  : Jean-Claude.Tarby@cmis.csiro.au        | 
+----------------+---------------------------------------------------+ 
|     http://www-trigone.univ-lille1.fr/jean_claude/Welcome.html     | 
+----------------+---------------------------------------------------+ 
|     DESS MICE  |  http://cueep.univ-lille1.fr/dess-mice            | 
|     DESS IPM   |  http://cueep.univ-lille1.fr/dess-ipm             | 
+----------------+---------------------------------------------------+ 









 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]