[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: $any$ in MSXML

Subject: RE: $any$ in MSXML
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 3 Aug 2004 20:31:56 +0100
msxml transforming to text
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.C.Cartwright@xxxxxxxx] 
> Sent: 03 August 2004 19:31
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  $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.C.Cartwright@xxxxxxxx
> =====================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.