|
Subject: [xsl] In XSLT context, base-uri() and document-uri() return different values From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 18 Aug 2021 15:27:35 -0000 |
In the context of an XSLT 3 transform run by Saxon-HE 9.9.1.7J, I have a
variable that contains an element from a document loaded using the document()
function.
In my code I use base-uri() to get the base URI of the element in order to
then resolve URIs relative to this element. This is in code thatbs been
around a long time (nearly 10 years).
In my latest use of this code, Ibm seeing that base-uri() for the node
reflects the URI of the transform, not the node, but document-uri() for the
elementbs root returns the expected document URI:
[xslt] + [DEBUG] df:resolveTopicRef():
base-uri($context)="file:/Users/eliot.kimber/git/dita-ot/dita-ot-air/plugins/
org.dita.html5/xsl/map2html5Impl.xsl"
[xslt] + [DEBUG] df:resolveTopicRef():
document-uri($context)="file:/Users/eliot.kimber/git/temp/aair/air-html/bundl
e-aair-automated-incident-response.ditamap"
My understanding of base-uri() is that I should get the same values for
base-uri() and document-uri() in this case because there are no explicit
xml:base attributes in the source document.
Why am I seeing this anomalous result from base-uri()? I didnbt see anything
in the XSLT 3 spec or in the XPath spec that would suggest this behavior
(looking for mentions of bbase-urib).
Thanks,
Eliot
--
Eliot Kimber
http://contrext.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] [XSL-FO] right alignment , Tony Graham tgraham@ | Thread | Re: [xsl] In XSLT context, base-uri, Michael Kay mike@xxx |
| Re: [xsl] [XSL-FO] right alignment , Tony Graham tgraham@ | Date | Re: [xsl] In XSLT context, base-uri, Michael Kay mike@xxx |
| Month |