Subject: [xsl] generate xsl 1.0 from 2.0 question From: "Bryan Rasmussen" <bry@xxxxxxxxxx> Date: Wed, 23 Jan 2002 09:48:22 +0100 |
I want to generate xslt 1.0 from 2.0(am obviously using saxon 7), here's a structure I had in my old xslt(when I was generating multiple xslt from xslt 1.0) for translating some strings that I output at different parts: <xsl:param name="translate" select="document('../generating_documents/languages.xml')"/> <xsl:param name="translator" select="$translate/translations/string"/> <xsl:template name="translator"> <temp:when test="/page[@language='{name()}']"><xsl:value-of select="."/></temp:when> </xsl:template> <xsl:template name="click_here"><temp:choose><xsl:for-each select="$translator[@name='Click_here']/child::node()[name()!='']"> <xsl:call-template name="translator"/></xsl:for-each></temp:choose> </xsl:template> (didn't use xml:lang in the translator template cause I ran into some problems that took longer than an hour to fix, and there were too many other things to fix at the time.) anyway the thing I was wondering about is in the template name="click_here" you'll notice I do the $translator[@name='Click_here'] is there anyway to select the name of the template one is in(in xslt 2.0), in such a way that I could make a parameter holding the template/@name value and pass it to a named template through a call? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to Create Side Heads , W. Eliot Kimber | Thread | Re: [xsl] generate xsl 1.0 from 2.0, Jeni Tennison |
RE: [xsl] Muenchian method, and key, DPawson | Date | RE: [xsl] Muenchian method, and key, DPawson |
Month |