|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Test a node set based on an attribute that will ma
I also have this same need in a few templates... But that returns an error It's not possible to have variable references in match patterns. You can probably avoid them by doing the test when you call the template, rather than in the match pattern. e.g. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="version">CO</xsl:variable> <xsl:template match="spec_off"> <xsl:apply-templates select="*[@*[local-name()=$version]='true']"/> </xsl:template> <xsl:template match="spec_off/*"> <xsl:text/>I'm an '<xsl:value-of select="local-name()"/>' node with a true '<xsl:value-of select="$version"/>' attribute. </xsl:template> </xsl:stylesheet>
|
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








