Subject: Re: determining position of a document included using document function
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 14 Feb 2002 08:36:51 +0000
|
Hi Bryan,
> I run stylesheet1 against document1, document1 has a structure sort
> of like in all the classic "xinclude with xslt" examples:
> i.e
> <doc>
> <file href="document2.xml"/>
> <file href="document3.xml"/>
> </doc>
> so when I get to the file node I use the document function as above
> to load the document referred to by the href attribute, then I
> apply-templates against that document, however I found in the
> document I loaded at one point I would really have liked to know
> something about the position of the file node which had the
> attribute href from which I knew what document to load! :)
I'm afraid that the only way I can think of to do this is by passing
the position of the file element as a parameter through the templates
that process the content of the document.
If the base URI of a node were available directly, you could achieve
it by parsing the base URI of the node that you were on and then going
back to the original document to locate the file element with that URI
in its href attribute. However, in the long run I think that would
probably be a lot messier than passing through the parameter.
Sorry, I know that wasn't the answer you were looking for.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- determining position of a document included using document function, (continued)
- Bryan Rasmussen - Wed, 13 Feb 2002 07:42:10 -0500 (EST)
- Wendell Piez - Wed, 13 Feb 2002 10:48:51 -0500 (EST)
- Bryan Rasmussen - Wed, 13 Feb 2002 11:27:48 -0500 (EST)
- Wendell Piez - Wed, 13 Feb 2002 13:04:19 -0500 (EST)
- Jeni Tennison - Thu, 14 Feb 2002 03:33:56 -0500 (EST) <=
- Gennady Loskutov - Thu, 14 Feb 2002 05:02:22 -0500 (EST)
- Jeni Tennison - Thu, 14 Feb 2002 05:43:20 -0500 (EST)
- Bryan Rasmussen - Thu, 14 Feb 2002 05:48:12 -0500 (EST)
- Bertrand Delacretaz - Wed, 13 Feb 2002 08:00:24 -0500 (EST)
|
|