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

Re: XSLT V 1.1

Subject: Re: XSLT V 1.1
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sun, 15 Oct 2000 18:54:11 +0100
Re: XSLT V 1.1
David Carlisle wrote:
>If you were looking to change things, I think it would be simpler to use
>a one-argument form of document() along with two functions, as follows
>
>select="document(uri-resolve-with-base(@href,uri-of-node(.)))"
>
>where uri-resolve-with-base() takes two strings and makes an absolute
>URI (essentially by removing anything after the last / in the base,
>concatenating that with the relative URI and then cleaning up ../ and ./
>segments, or just returning the first argument if it is already absolute)
>
>and uri-of-node() returns the URI of the first node in its node-set
>argument.

This solution wouldn't handle situations where there are multiple documents
being accessed through the same document() call:

<class-files>
  <file href="class1.xml" />
  <file href="class2.xml" />
  <file href="class3.xml" />
</class-files>

<xsl:for-each select="document(class-files/file/@href)/classes/class">
  <xsl:sort select="@name" />
  ...
</xsl:for-each>

If document() accepted only single strings (or nodes), sorting a collection
of classes drawn from several files would, I think (?), only be possible by
going through an intermediary result tree fragment.

Cheers,

Jeni

Jeni Tennison
http://www.jenitennison.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.