Actions
Bug #5378
closedThe system identifier of the principal output file is unknown
Start date:
2022-03-08
Due date:
% Done:
0%
Estimated time:
Found in version:
11.2
Fixed in version:
Platforms:
Description
The following comment was raised by Martin in the bug issue #5376 :
It seems still a bit confusing that transformToString works fine without setting xslte->setBaseOutputURI("file:///location/"); in code not using xsl:result-document e.g. with
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" expand-text="yes">
<xsl:output method="xml" encoding="utf-8" standalone="yes" indent="yes"/>
<xsl:template match="/">
<xsl:message>producing sheet</xsl:message>
<main-result>
<tested-at>{current-dateTime()}</tested-at>
<static-base-uri>{static-base-uri()}</static-base-uri>
</main-result>
<!--<xsl:result-document href="output.xml">
<result>
<value>
You put a <xsl:value-of select="/xml/value"/>
</value>
</result>
</xsl:result-document>-->
</xsl:template>
</xsl:stylesheet>
but as soon as I uncomment the use of xsl:result-document with the relative URI SaxonC gives the
SXRD0002 The system identifier of the principal output file is unknown
In template rule with match="/" on line 4 of result-document-test2.xsl
Perhaps that just needs better documentation/explanation in the documentation that the use of the transformToString together with xsl:result-document requires an explicit setting of the base output URI if relative URIs are used in the XSLT. But it kind of feels that the base output uri might be available from the stylesheet's base URI, as it seems to be if the target is a transformToFile.
Related issues
Please register to edit this issue
Actions