[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: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Wed, 16 Feb 2000 14:06:29 -0500
RE: Which one to choose
Hi,

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? if some engines cannot run the
example below, it would be interest to know which ones.

On XT you can do:
<xsl:variable name="foo"
select="document('http://remoteserver/file.xml')/path/to/some/nodes"/>

My own interpretation of the recommendations is that the last construct is
OK since document() is an Xpath function and can therefore be part of a
step. So, the first step (i.e. document() ) parses and build a node set,
tThen all the other subsequent steps navigate into this node set.

I used, as well, the following construct in XT:
<xsl:apply-template
select="document('http://remoteserver/file.xml')/path/to/some/nodes"/>

I also used with sucess a construct like:
<xsl:apply-template select="document(@xlink:href)/path/to/some/nodes"/>

This last construct is probably the most powerful since you take the value
of a node (for instance an attribute) and take this value as an input for
the document's URI.

Cheers
Didier PH Martin
----------------------------------------------
Email: martind@xxxxxxxxxxxxx
Conferences: Web New York (http://www.mfweb.com)
Book: XML Pro published by Wrox Press
Products: http://www.netfolder.com


 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.