[Bug 29939] [FO31] fn:transform stylesheet-base-uri options

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29939

--- Comment #2 from Tim Mills <tim@cbcl.co.uk> ---
I'm targetting XSLT 2.0 processors, for which the base URI was solely described
as follows.

"The base URI is the base URI of the containing element. The concept of the
base URI of a node is defined in Section 5.2 base-uri Accessor"

The full text from XSLT 3.0 says:


"Static base URI: In a conventional interpreted environment, the static base
URI of an expression in the stylesheet is the base URI of the containing
element in the stylesheet. The concept of the base URI of a node is defined in
Section 5.2 base-uri Accessor DM30.

When stylesheets are executed in an environment where no source code is present
(for example, because the code of the stylesheet has been compiled and is
distributed as executable object code), it is recommended (subject to
operational constraints such as security) that the static base URI used during
stylesheet evaluation should be the location from which the stylesheet was
loaded for execution (its "deployed location"). This means, for example, that
when the docFO30 or document functions are called with a relative URI, the
required document is by default located relative to the deployed location of
the stylesheet.

Whether or not the stylesheet is executed directly from source code, it is
possible that no static base URI is available, for example because the code was
supplied as an anonymous input stream, or because security policies are set to
prevent executable code discovering the location from which it was loaded. If
the static base URI is not known, the static-base-uriFO30 function returns an
empty sequence, and other operations that depend on the static base URI may
fail with a dynamic error."

So I see if you are targetting an XSLT 3.0 processor, you could set the static
base URI as described in the second paragraph, and that CASE 1 corresponds to
"the code was supplied as an anonymous input stream" (where specifying a
stylesheet base URI makes sense).


Could you clerify whether setting the stylesheet-base-uri option instructs the
XSLT processor to ignore the base URI properties of all nodes read from the
principal stylesheet module, i.e. including any which are derived from xml:base
attributes?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 18 October 2016 09:55:38 UTC