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
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
>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

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

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

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

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.



Jeni Tennison

 XSL-List info and archive:

Current Thread