xsl:result-document : Invalid URI syntax: URI is not absolute
Posted: Tue Aug 25, 2020 1:50 pm
Hi All,
DITA-OT 2.4.6
Below is the template to create a ditamap for each chapter in conversion of xml to generic dita. It's working fine in my local laptop. When I deploy the code to our linux server, and run the conversion process, it's failing with below error message.
Running:
/uae/java/current/bin/java \
'TransformUsingXMLSchema' \
'/h/uaework/staging/docs/03/s20062603/en/Recruiting_Cloud.xml' \
'/h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl' \
'/h/uaework/staging/docs/03/s20062603/en/Recruiting_Cloud/Recruiting_Cloud.ditamap' |
On Sun Aug 23 23:13:42 2020
JAVA: Adding bookmap...
JAVA: Error at xsl:result-document on line 214 of fusion2fusionMap.xsl:
JAVA: Exception thrown by OutputURIResolver: Invalid URI syntax: URI is not absolute
JAVA: at xsl:apply-templates (file:/h/uaework/custom/doctypes/CommonDita/xsl/fusion2fusionMap.xsl#43)
JAVA: processing /fusionMap/chapter[1]
JAVA: at xsl:apply-templates (file:///h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl#161)
JAVA: processing /fusionMap
JAVA: Error converting from '/h/uaework/staging/docs/03/s20062603/en/Recruiting_CloudUsing_Hiring_20062603c.xml' to '/h/uaework/staging/docs/03/s20062603/en/Recruiting_CloudUsing_Hiring_20062603dm/Recruiting_CloudUsing_Hiring_20062603c.ditamap' using '/h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl'
JAVA:
JAVA: ; SystemID: file:/h/uaework/custom/doctypes/CommonDita/xsl/fusion2fusionMap.xsl; Line#: 214; Column#: -1
JAVA: net.sf.saxon.trans.XPathException: Exception thrown by OutputURIResolver
Thanks,
Samba.
DITA-OT 2.4.6
Below is the template to create a ditamap for each chapter in conversion of xml to generic dita. It's working fine in my local laptop. When I deploy the code to our linux server, and run the conversion process, it's failing with below error message.
Running:
/uae/java/current/bin/java \
'TransformUsingXMLSchema' \
'/h/uaework/staging/docs/03/s20062603/en/Recruiting_Cloud.xml' \
'/h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl' \
'/h/uaework/staging/docs/03/s20062603/en/Recruiting_Cloud/Recruiting_Cloud.ditamap' |
On Sun Aug 23 23:13:42 2020
JAVA: Adding bookmap...
JAVA: Error at xsl:result-document on line 214 of fusion2fusionMap.xsl:
JAVA: Exception thrown by OutputURIResolver: Invalid URI syntax: URI is not absolute
JAVA: at xsl:apply-templates (file:/h/uaework/custom/doctypes/CommonDita/xsl/fusion2fusionMap.xsl#43)
JAVA: processing /fusionMap/chapter[1]
JAVA: at xsl:apply-templates (file:///h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl#161)
JAVA: processing /fusionMap
JAVA: Error converting from '/h/uaework/staging/docs/03/s20062603/en/Recruiting_CloudUsing_Hiring_20062603c.xml' to '/h/uaework/staging/docs/03/s20062603/en/Recruiting_CloudUsing_Hiring_20062603dm/Recruiting_CloudUsing_Hiring_20062603c.ditamap' using '/h/uaework/custom/doctypes/CommonDita/xsl/fusion2dita.xsl'
JAVA:
JAVA: ; SystemID: file:/h/uaework/custom/doctypes/CommonDita/xsl/fusion2fusionMap.xsl; Line#: 214; Column#: -1
JAVA: net.sf.saxon.trans.XPathException: Exception thrown by OutputURIResolver
Could you suggest any clue to fix the issue? Suspecting some thing wrong with href attribute value of xsl:result-document element. I am able to print the value of $map_filename_with_extn variable as expected.
<xsl:template match="chapter" >
<xsl:call-template name="dbg:trace"/>
<topichead>
<xsl:attribute name="id"><xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:attribute name="navtitle"><xsl:value-of select="@title"/>
</xsl:attribute>
<xsl:variable name="map_file_name">
<xsl:call-template name="generatename">
<xsl:with-param name="title">
<xsl:value-of select="@title"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<mapref format="ditamap"
href="{$map_file_name}.ditamap"
scope="local" />
<xsl:variable name="map_filename_with_extn" select="concat($map_file_name,'.ditamap')" />
<xsl:message>map_filename_with_extn:<xsl:value-of select="$map_filename_with_extn"/></xsl:message>
<xsl:result-document
method="xml"
href="{$map_filename_with_extn}" doctype-system="map.dtd"
doctype-public="-//OASIS//DTD DITA Map//EN"
encoding="UTF-8"
indent="yes">
<map xml:lang="en">
<title>
<xsl:value-of select="@title"/>
</title>
<xsl:apply-templates />
</map>
</xsl:result-document>
</topichead>
</xsl:template>
Thanks,
Samba.