Hon*_*jzl 1 xslt exist-db processing-instruction
有没有办法让 eXist 按原样返回处理指令?看起来它在输出中以某种方式忽略了它。
\n\n如果我使用 XEP 作为渲染引擎,处理指令非常有用,因此如果能够在 XSL-FO 文档的根之前或在其启动之后立即保留它们,那就太好了。
\n\n如果我在模板中有:
\n\n<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:tei="http://www.tei-c.org/ns/1.0" version="2.0">\n <xsl:template match="/">\n <fo:root>\n <?xep-pdf-page-layout two-columns-right?>\nRun Code Online (Sandbox Code Playgroud)\n\n它只是返回:
\n\n<fo:root xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">\n <fo:layout-master-set>\nRun Code Online (Sandbox Code Playgroud)\n\n我\xe2\x80\x99ve尝试在查询的序言中使用:\n来保存处理指令,declare option exist:serialize "method=xhtml media-type=text/xml process-xsl-pi=yes";但无济于事。
更新一
\n\n我的场景的步骤是:
\n\ntransform:transform()函数transform:transform()函数时,我向其传递一个基本样式表,其中包括其他样式表pages-masters,该样式表覆盖了渲染引擎稍后使用的 FO 文档的根。该样式表包含 ( <xsl:include/>) 到基本样式表(收集所有样式表)中并传递给函数。使用 XSLT,要输出处理指令,请使用https://www.w3.org/TR/xslt/#creating-processing-instructions,即在转换结果中<xsl:processing-instruction name="xep-pdf-page-layout">two-columns-right</xsl:processing-instruction>包含 pi 。<?xep-pdf-page-layout two-columns-right?>