|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] paratheses and or (|) operator? --converting old WD s
XSL List:
I'm trying to convert an older http://www.w3.org/TR/WD-xsl based stylesheet and run across the following problem (simplified) section: <xsl:choose> <xsl:when test="/metadata[($any$ idinfo/(descript/(abstract | purpose | supplinf) | browse/browsen) != '')]"> <p><b>Abstract:</b><xsl:value-of select="/metadata/idinfo/descript/abstract" /> </p> </xsl:when> <xsl:otherwise> <p>No descriptive information found.</p> </xsl:otherwise> </xsl:choose> With the $any$ token and paratheses, this doesn't work in XPath 1.0. I've converted this to (which works): <xsl:choose> <xsl:when test="/metadata[idinfo/descript/abstract | idinfo/descript/purpose | idinfo/descript/supplinf | idinfo/browse/browsen != '']"> <p><b>Abstract:</b><xsl:value-of select="/metadata/idinfo/descript/abstract" /> </p> </xsl:when> <xsl:otherwise> <p>No descriptive information found.</p> </xsl:otherwise> </xsl:choose> My question: is there a simpler way to translated the nested paratheses of the WD orginal into XPath 1.0? In some cases, I have 30-40 elements being tested by this nested approach. Thanks, -Eric
|
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








