I don't know the exact semantics of the WD-xsl dialect (I suspect it was
never very well specified), but it's essentially doing an existential
quantification, which is what the XPath operators "=", "!=" etc do by
default. So it's probably safe to drop it.
I would guess you can further simplify
metadata/spref[.//* != '']
to
metadata/spref[. != '']
since if an element has a descendant whose string-value is non-empty, the
element itself will have a string-value that is non-empty. But the converse
condition isn't true: if the element is <spref>zzz</spref> then the first
condition will be false and the second will be true.
Watch out for whitespace: WD-xsl strips whitespace-only text nodes by
default, whereas XSLT doesn't.
Michael Kay
-----Original Message-----
From: John C Cartwright
[mailto:John(_dot_)C(_dot_)Cartwright(_at_)noaa(_dot_)gov]
Sent: 03 August 2004 19:31
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] $any$ in MSXML
Hello All,
I'm converting an old MSXML stylesheet and am looking for
suggestions on
replacing constructs like the following:
<xsl:if test="metadata/spref[$any$ .//* != '']">
So far, I've just been removing the "$any$" and although it seems to
work OK, I'm a little uncomfortable with that approach since I can't
seem to find documentation on exactly what that is supposed
to represent.
Can anyone explain this, suggest a better replacement, or point me to
documentation that does?
Thanks!
-- john
=====================================================
John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
John(_dot_)C(_dot_)Cartwright(_at_)noaa(_dot_)gov
=====================================================
--+------------------------------------------------------------------
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>
--+--