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

problem getting "every" expression to work

Subject: problem getting "every" expression to work
From: Joyce Celeste Chapman <chapmajc@xxxxxxxxxxxxx>
Date: Mon, 20 Jul 2009 13:47:44 -0400
 problem getting "every" expression to work
Dear all,

Beginner here! I've been trying to use the "every" expression, but I can't seem to get it right. I put an example below and I'm hoping someone can help. I'm trying to do one thing when the element <container> is encoded for every c02[not(@level)] but something else when some of the c02[not(@level)] do not have <container> encoded. The example XSL code below is currently processing both of the <c01> in the example XML, even though the second <c01> has a <c02> with no <container> encoded.

Thanks in advance for any help!
Joyce Chapman

XSL:
<xsl:template c01[@level='series']>
<xsl:when test="c02[not(@level)][every $i in did satisfies $i/container]">
...do such and such...
...otherwise do such and such...
</xsl:template>

XML:
<c01 level="series">
<c02>
<did>
<container type="folder">239</container>
<unittitle>Committee on Economic and Racial Justice, 1935-1941</unittitle>
</did>
</c02>
<c02>
<did>
<container type="folder">239</container>
<unittitle>Congregational Christian Service Committee International Service Center,
1949-1950</unittitle>
</did>
</c02>
</c01>


<c01 level="series">
<c02>
<did>
<container type="folder">239</container>
<unittitle>Committee on Economic and Racial Justice, 1935-1941</unittitle>
</did>
</c02>
<c02>
<did>
<unittitle>Congregational Christian Service Committee International Service Center,
1949-1950</unittitle>
</did>
</c02>
</c01>


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.