Why no indent when use XProc to execute XSLT?
Posted: Mon Feb 26, 2018 10:37 pm
XSLT file (test-xproc.xsl):
XProc file (test-xproc.xpl):
The result of XProc is <AAA><BBB><CCC/></BBB></AAA>, no indent.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template name="main">
<AAA>
<BBB>
<CCC>
</CCC>
</BBB>
</AAA>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"">
<p:xslt template-name="main">
<p:input port="stylesheet">
<p:document href="./test-xproc.xsl"/>
</p:input>
</p:xslt>
</p:pipeline>