Your issues is actually that the default template is being applied for an
item element that doesn't match the distribution predicate.
Add <xsl:template match="item"/> which will have a lower precedence that the
distribution qualified one and produce nothing.
Peter.
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of
john liao
Sent: Tuesday, 14 January 2003 3:49 p.m.
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] difference btw match="item[(_at_)distribution!='both']" and
test="@distribution!='both"
Hi list
I found the two methods yield slightly different
results w.r.t <![CDATA]>. In the first template match
the contents of CDATA is produced, but the <xsl:if
test method does not produce it. What's the
difference?
"item" looks like this:
<item distribution="both">
<![CDATA
contents of CDATA
]]
</item>
and the templates look like this:
<xsl:template match="item[(_at_)distribution!='both']"
...
...
</xsl:template> ==> contents of CDATA show up
<xsl:template match="item">
<xsl:if test="@distribution!='both'">
...
...
</xsl:if>
</xsl:template> ==> produces nothing (which is
what I want)
=====
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list