Project

Profile

Help

Support #3172

closed

xsl:evaluate/@base-uri doesn't affect an evaluated base-uri()

Added by Nick Nunes over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-03-17
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

evaluate.base-uri.xsl (469 Bytes) evaluate.base-uri.xsl Nick Nunes, 2017-03-17 23:08
Actions #1

Updated by Michael Kay over 7 years ago

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.

Actions #2

Updated by Michael Kay over 7 years ago

  • 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