Why no indent when use XProc to execute XSLT?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 22
- Joined: Tue Oct 17, 2017 5:05 pm
Why no indent when use XProc to execute XSLT?
Post by serioadamo97 »
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>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Why no indent when use XProc to execute XSLT?
HI,
For pipelines XProc has its own serialization that overrides the one of the XSLT processor.
Use p:serialization to specify the serialization rules for your pipeline.
To get the same result as transforming the XSL directly, use:
Regards,
Adrian
For pipelines XProc has its own serialization that overrides the one of the XSLT processor.
Use p:serialization to specify the serialization rules for your pipeline.
To get the same result as transforming the XSL directly, use:
Code: Select all
<p:serialization port="result" method="xml" indent="true" omit-xml-declaration="false"/>
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Tue Oct 17, 2017 5:05 pm
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service