|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: dynamic variable name/implementation question
Ooops, sorry I was unclear.
I interpreted the path OP had gone down was something like: <xsl:stylesheet> <xsl:param name="p1"/> <xsl:param name="p2"/> <xsl:param name="p3"/> ... in which case the template match could look like: <xsl:template match="external-vaue"> <xsl:choose> <xsl:when test="@parameter = 'someParam'"> <xsl:value-of select="$p1"/> </xsl:when> <xsl:when test="@parameter = 'someOtherParam'"> <xsl:value-of select="$p2"/> </xsl:when> </xsl:choose> </xsl:template> I understand the value of getting a nodeset instead. We use that technique to embed terms in the XML that get localized using an xsl and xml dictionary file. Simplified: <xsl:stylesheet> <xsl:param name="language" select="'en'"/> <xsl:param name="country" select="'US'"/> <xsl:param name="dictName"/> <xsl:variable name="dictionary" select="document($dictName)"/> <xsl:template match="/ | @* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> <xsl:template match="translateterm"> <xsl:variable name="keyToFind" select="@key"/> <xsl:value-of select="$dictionary/dictionary/bundle[@language=$language]/bundle[@country=$country]/translateterm[@key=$keyToFind]"/> </xsl:template> </xsl:stylesheet> -------------->Nathan On Thu, 25 Aug 2005 13:39:00 -0700, Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: On 8/26/05, Nathan Young <natyoung@xxxxxxxxx> wrote:Hi. -- .:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:. Nathan Young A: ncy1717 E: natyoung@xxxxxxxxx
|
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








