|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: named template that returns xpath expression
Thanks a lot for your suggestion.
James Carlyle wrote: Hi <xsl:template name="this"> <xsl:for-each select="ancestor-or-self::*">
<xsl:text>/</xsl:text><xsl:value-of select="name()"/>[<xsl:number/>]<xsl:text/>
</xsl:for-each></xsl:template> <xsl:template match="paragraph">
<xsl:variable name="location">
<xsl:call-template name="this"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="@mode='note'">
<div class="note">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$location"/>
</xsl:attribute>
</a>
</div>
</xsl:when>
<xsl:otherwise>
<p><xsl:apply-templates /></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>works as desired. -- Eike Jordan <jordan@xxxxxxxxxxxxx> | FIZ CHEMIE BERLIN | Franklin Str. 11 ------ ,__o | 10587 Berlin ------ _-\_<, | ------ (+)/'(+) | Tel. : 0049-30-39977 214 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








