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

RE: Which one to choose

Subject: RE: Which one to choose
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Wed, 16 Feb 2000 12:53:36 -0700
RE: Which one to choose
> I saw today several times the following construct:
> <xsl:variable name="foo" 
> select="document('http://remoteserver/file.xml')"/>
> <xsl:value-of select="$foo/path/to/some/nodes"/>
> 
> Is it because the XSLT engine used has some limitations? different
> interpretation of the recommendations?

No, it was just an example. I didn't want to provide examples of every
possible use of the document() function, so I picked the one that in my
opinion was the most useful. If you are going to be referring to a document
multiple times, it makes more sense to only call document() once and bind
the node-set it returns to a variable, then refer to that variable.

Like any other function, it returns an object of one of the types: node-set,
number, boolean, string, result tree fragment. You know that it returns a
node-set, so you can use it anywhere where you expect to see a node-set. So
it could be the first location step in an XPath expression. I am not aware
of any XSL processors (aside from IE) that would have any trouble with that.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.