Subject: Re: [xsl] xsl:key and document() From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Tue, 9 Jan 2001 10:33:18 +0000 |
Hi David, > but you could use document('',/) ie the relative (empty) URI from > the base URI of the root node of the source. (But as you say I don't > think there is any guarantee that the original document can actually > be constructed from this URI) You had me swooning in admiration for a moment then, until I realised that if you can get the root (or indeed any node) of the source document by just using / then there's no need to use document('', /) to get the root of the source document :) / == document('', /) == document('', document('', /)) I *would* like to see a way of retrieving the URL of the source document, mainly because it would make dynamic client-side XSLT a lot easier - you usually need to include the URL of the source document in the script that loads the next view on that document. In XSLT 1.1, there's 'support for XML Base'. It would be nice to have a base-uri() function in XPath 1.1 (or perhaps in XSLT 1.1) that allowed you to access the base URI of a node. As a temporary work around, it might be worth adopting a convention of adding an xml:base attribute to the document element to give its URL. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:key and document(), David Carlisle | Thread | Re: [xsl] xsl:key and document(), David Carlisle |
RE: [xsl] XML to RTF with XSL?, DPawson | Date | Re: [xsl] xsl:key and document(), David Carlisle |
Month |