[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|