[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|