I referred [stackoverflow][1]before posting this issue , as getting same issue I hope to ask from you all..
I have a XSLT transformation for creating four outputs using xsl:result-document
when I run this using oxygen tool it is created required output.But I want to implement this from java . Already saxon methods have implemented from java.
Saxon-HE:9.7.0-14 version
XSLT version :2
Example XSLT for one file:
<xsl:template match="/" mode="aa">
<xsl:param name="book-name" tunnel="yes"/>
<xsl:result-document href="{$book-name}.opf"
doctype-public="+//ISBN 0-9673008-1-9//DTD OEB 1.2 Package//EN"
doctype-system="http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd"
indent="yes">
<xsl:apply-templates mode="#current"/>
</xsl:result-document>
</xsl:template>
I have no idea why is this not working on Java though this is working on running pure transformation.. Do I need to add external jar for this. And this is not giving me any error or output.
Note: When I added xsl:comment or another tag it is working on Java and I am getting that output correctly.
XSLT for creating one file
<xsl:call-template name="validate-source-book"/> <xsl:variable name="pre-processed"> <xsl:apply-templates mode="pre-processing"/> </xsl:variable> <xsl:variable name="structured"> <xsl:apply-templates select="$pre-processed" mode="structuring"/> </xsl:variable> <xsl:call-template name="generate-output-files"> <xsl:with-param name="book-name" select="$book-name" tunnel="yes"/> <xsl:with-param name="structured-document" select="$structured"/> </xsl:call-template> </xsl:template>
<xsl:result-document href="{$book-name}.opf" doctype-public="+//ISBN 0-9673008-1-9//DTD OEB 1.2 Package//EN" doctype-system="http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd" indent="yes"> <xsl:apply-templates mode="#current"/> </xsl:result-document> </xsl:template>
Thanks in advance..!