0
我是Java新手。我有一个类似的场景为[Catch output stream of xsl result-document,但我不理解什么通过为href和基础参数..如何在Java中实现saxon OutputURIResolver?
我的XSLT(结果文档)如下:
<xsl:template match="/" mode="create-text-file">
<xsl:param name="book-name" tunnel="yes"/>
<xsl:result-document href="{$book-name}.xml"
doctype-public=" test"
doctype-system="test.dtd">
<xsl:apply-templates/>
</xsl:result-document>
</xsl:template>
另:
<xsl:result-document href="{$book-name}.opf"
doctype-public=""
doctype-system=""
indent="yes">
<xsl:apply-templates mode="#current"/>
</xsl:result-document>
参数书的名字越来越为:
<xsl:template match="document-node()">
<xsl:variable name="book-name" select="tps:get-file-name(document-uri(/))"/>
能否请您给我解释一下无线这个结果文件?
在此先感谢。
先生可以当我不使用命令行参数我们给出了一个文件夹路径或自定义位置为基础?而我所理解的是,如果我们提取了xslt zip包(根据我的场景),OutputURIResolver就是获取href值。 – user2490093
如果使用s9api接口则可以使用所设置的基本输出URI'XsltTransformer.setBaseOutputURI()'。在JAXP中没有等价物,因为JAXP是为XSLT 1.0设计的。 –