Subject: Re: node test in patern from string() From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 16 Aug 1999 21:35:03 -0400 |
Can anyone help me with how to use a string variable as part of a pattern? The following is illegal but it shows what I want to do.
<xsl:call-template name="buildEnum"> <xsl:with-param name="enum" select="string('region')"/> </xsl:template>
<xsl:template name="buildEnum"> <xsl:param name="enum"/> <xsl:variable name="enums" select="document('../common/enum.xml')/enums/$enum"/> </xsl:template>
The XT error occurs on the variable definition at the $enum - "expected node test".
<xsl:variable name="enums" select="document('../common/enum.xml')/enums/*[local-name(.)=$enum]"/>
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Website: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-01-2 Next instructor-led training: MT'99 1999-12-05/06
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
node test in patern from string(), Jon Smirl | Thread | xsl:key and imports, Denys Duchier |
Re: Netscape support for XSL Styles, James Robertson | Date | Re: xml to pdf with fop, Sebastian Rahtz |
Month |