paratheses,and or,xsl when or operator,xsl and or operator,idinfo descript,xsl when test and or,xsl when operators or,xsl when and or,list and or,paratheses in html, xml%%%paratheses - paratheses and or (

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

paratheses and or (|) operator? --converting old WD s

Subject: paratheses and or (|) operator? --converting old WD stylesheet
From: Eric Compas <edcompas@xxxxxxxx>
Date: Fri, 07 Jan 2005 10:46:03 -0600
paratheses
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.