This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSLT V 1.1
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: XSLT V 1.1
- From: Eckenberger Axel <Extern dot Eckenberger at kmweg dot de>
- Date: Fri, 15 Sep 2000 13:12:17 +0200
- Reply-To: xsl-list at mulberrytech dot com
Someone seems to have swallowed the original mail so here's a repost (w/o)
attatchment in case this was the cause.
This looks better, however I think that this will cut the possiblities you
have with the current document function. I re-read the specification
yesterday evening and this is what I came up with. The document function
allows you to do the following (use case), please correct me if I am wrong.
- allows you to retrieve the root node of the stylesheet [document("")]
- allows you to retrieve a single document relative to the stylesheet
[document('URI')]
- allows you to retrieve a single document relative to an arbitrary node
[document('URI', nodeSet)]
up to this your function (document(string, string?)) works well, but
consider this
- allows you to retrieve more than one document, stored in an xml node-set
(<nodeName>URI</nodeName>), relative to the stylesheet [document(nodeSet)]
- allows you to retrieve more than one document, stored in an xml node-set
(<nodeName>URI</nodeName>), relative to an arbitrary node [document(nodeSet,
nodeSet)]
This allows you to reference a predefined set of resources. This especially
gets interesting if you consider this
document(document('relative URI', .), .)
document(document('relative URI', .), document('relative URI'))
and further combinations of this.
I enclosed a zip file with some code to show these use cases.
I admitt that this might also be possible with your suggestion, however I
think that in the long-run will produce longer, and more difficult code as
you will have nested
<apply-templates select="document()"/> statements.
Axel
> -----Original Message-----
> From: Paul Tchistopolskii [mailto:paul@qub.com]
> Sent: Friday, September 15, 2000 3:48 AM
> To: xsl-list@mulberrytech.com
> Subject: Re: XSLT V 1.1
>
>
>
> Correcting cut-n-paste typo.
>
> ------------------------------
> New document() semantcis. V 2.0.
> ------------------------------
>
> Function: node-set document( string, string ? )
>
> The document function allows access to XML sources other than
> the main source document.
>
> First parameter is the URI of the document to be retrived.
> If first parameter is relative URI, second parameter is used to
> specify the base URI. If second parameter is not specified, but
> first parameter is relative - first URI is resolved relatively
> to XML document which is processed.
>
> Empty string "" works like a reference to stylesheet
> document itself.
>
> Thus document("") refers to the root node of the stylesheet,
> and document("../some/other.xml", "") resolves the
> first URI to relatively to the stylesheet document.
>
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list