Project

Profile

Help

Bug #4471

closed

Base URI of configuration file supplied to fn:transform()

Added by Michael Kay about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT 3.0 packages
Sprint/Milestone:
-
Start date:
2020-03-02
Due date:
% Done:

100%

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

Description

From saxon-help mailing list:

When I have config.xml like this

  <configuration xmlns="http://saxon.sf.net/ns/configuration">
     <xsltPackages>
        <package name="http://example.org/package.xsl" sourceLocation="../package/package.xsl"
           version="1.0" />
     </xsltPackages>
  </configuration>

and provide it to fn:transform() like this

  <xsl:variable name="config" select="doc('../config/config.xml')" />
  <xsl:variable as="map(*)" name="options"
     select="
        map {
           'stylesheet-location': '../use-package/use-package.xsl',
           'initial-template': xs:QName('xsl:initial-template'),
           'vendor-options':
              map {
                 QName('http://saxon.sf.net/', 'configuration'): $config
              }
        }" />
  <xsl:sequence select="transform($options)?output" />

then @sourceLocation in the config is not resolved as relative to config.xml. (but to the current directory? it seems)

Could this be improved? Otherwise I'll have to fix up every URI in the config dynamically...

Please register to edit this issue

Also available in: Atom PDF