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設計的。 –