W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2002

RE: section 14.1

From: Clarke, Agnes <Agnes_Clarke@nl.compuware.com>
Date: Tue, 2 Apr 2002 16:28:36 +0200
Message-ID: <D913221A882FD31198D90008C75D69090667F8AB@cwnl-ams-pri01.nl.compuware.com>
To: "'Kay, Michael'" <Michael.Kay@softwareag.com>, "Zbyszynski, Marc" <mzbyszynski@doubleclick.net>, "'xsl-editors@w3.org'" <xsl-editors@w3.org>
If information about the 'input collection' is provided by XSLT 2.0, then
the following would be useful:

1. the content (nodes) of the input collection
2. the location(s) of the input collection. For example, it can be necessary
to construct links to an input document, or to do some URL manipulation
3. Similar information about the output collection.

In XSLT 1.0 & 1.1 (and 2.0 currently) the input document and output document
are strangely handicapped: the stylesheet knows less about these documents
then it does about secondary documents. The secondary document is known both
in terms of content and location.

This is particularly important for multiple document output, where the
primary input / output documents are only one amongst many interlinked
files. As a workaround, you must adopt a structure where the primary input
is an index file pointing to all the secondary files, or you must reproduce
the information about the primary file using global variables and parameters
(so you have a variable containing the data of the input file and a
parameter which contains the URL of the input file).

Rgds,

Agnes Clarke
www.agslin.net

-----Original Message-----
From: Kay, Michael [mailto:Michael.Kay@softwareag.com]
Sent: Tuesday, April 02, 2002 2:47 PM
To: Zbyszynski, Marc; 'xsl-editors@w3.org'
Subject: RE: section 14.1


> One 
> concern that I
> have that does still not seem to be addressed is the ability to reference
> nodes in the principal source document while processing a 
> node-set loaded using the document() function.

The conventional (XSLT 1.0) solution to this is to declare a global
variable:

<xsl:variable name="root" select="/"/>

which means that the principal source document can be referenced anywhere as
$root. This solution remains available in XSLT 2.0.

We have also been looking at the possibility of providing a function called
input() which provides access to the "input collection" (which may default
to being simply the principal source document, or may be a generalization of
this concept). The semantics of this still need a little work.

> 
> ps. it would also be great if there were some way to modify 
> variable values
> in process (such as within a for-each loop)... But I am sure 
> I am not the first person who has asked for that...
>
We're not intending to make this major change, which would turn the language
from a declarative language into a sequential, procedural one.

Thanks for the feedback,

Michael Kay
Software AG 


-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 
Received on Tuesday, 2 April 2002 09:28:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:53 GMT