[Home] [By Thread] [By Date] [Recent Entries]
Joyce Celeste Chapman wrote:
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. <xsl:template c01[@level='series']> <xsl:when test="c02[not(@level)][every $i in did satisfies $i/container]"> The test="c02[...]" is true if there is at least one such c02 so you seem to want test="every $c in c02[not(@level)] satisfies (every $i in $c/did satisfies $i/container)" to ensure all c02 satisfy the condition. -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



