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[(_at_)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/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--