Support #3172
closed
xsl:evaluate/@base-uri doesn't affect an evaluated base-uri()
Fixed in Maintenance Release:
Description
When an xsl:evaluate/@xpath contains a base-uri() call the value in @base-uri does not appear to affect the result of the function. Am I misunderstanding the point of @base-uri or some nuance of it?
See the attached stylesheet for an example
Files
I think you are confusing the base-uri() and static-base-uri() functions.
The @base-uri attribute on xsl:evaluate establishes the static base URI of the target XPath expression. This is relevant if, for example, the expression uses the doc() function supplying a relative URI as the argument. The easiest way to discover the static base URI of an expression is to use the static-base-uri() function.
The base-uri() function returns the base URI of a node in a source document: with no arguments it returns the base URI of the context item. In your example, where the context item is a node constructed using a literal result element within xsl:variable, the base URI of the node will be the static base URI of the stylesheet, and is not affected by the @base-uri attribute of xsl:evaluate.
- Tracker changed from Bug to Support
- Status changed from New to Closed
- Assignee set to Michael Kay
Closing this as I think it is a misunderstanding of the spec; feel free to re-open if this is not the case.
Please register to edit this issue
Also available in: Atom
PDF