I almost get it..
If current node value contains "directnic.com" (keyword "contains" -
since the current node might be something like:
"Your sales respresentative <sales(_at_)directnic(_dot_)com> is trying to reach
you".
Then how would I set up your count example to test this? So, do not
match elements that contain "directnic.com".
Karl..
On 5/30/05, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
Having trouble with contains. I have a set of elements derived from a
source xml which contains the parts of an email that are bad, that I'd
like to ignore in my result. An example would be the domain of my
hosting company like so it would be listed as "lfchosting.com" and
another element might be "directnic.com".
So I have:
<xsl:if test="not(contains($bad_emails_contains,.))">
... do my result ...
</xsl:if>
If $bad_emails_contains is a set of elements, then this won't work. The
contains() function expects a string. I think you might be trying to test
whether a node-set contains a given node (*please* don't try to guess what a
function does from its name alone!), in which case the XSLT 1.0 solution is
count($nodeset | $node) = count($nodeset)
The 2.0 solution is
exists($nodeset[. is $node])
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--