removing the <?xml ... header
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 72
- Joined: Tue Oct 21, 2014 10:01 pm
removing the <?xml ... header
Our doc server configuration was recently updated to allow HTML files (.html) to parse PHP code. As a result, the html header, "<?xml version="1.0" encoding="UTF-8"?>" is causing http 500 errors. Is there a way to remove this header from the XHTML transform?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: removing the <?xml ... header
Hi,
The brute force attach would be to create your custom ANT build file:
https://www.oxygenxml.com/doc/versions/ ... -file.html
which calls the XHTML transformation then at the end goes through each HTML document in the output folder and uses regular expressions to remove that header:
https://ant.apache.org/manual/Tasks/replaceregexp.html
Otherwise you may want to try creating an XHTML plugin XSLT customization and your custom.xsl would define an xsl:output which omits the XML declaration:
A simple example example of a DITA OT plugin customizing the XHTML output is for example this one:
https://github.com/oxygenxml/dita-embed-html
But I have not tested this, so it might not work.
Regards,
Radu
The brute force attach would be to create your custom ANT build file:
https://www.oxygenxml.com/doc/versions/ ... -file.html
which calls the XHTML transformation then at the end goes through each HTML document in the output folder and uses regular expressions to remove that header:
https://ant.apache.org/manual/Tasks/replaceregexp.html
Otherwise you may want to try creating an XHTML plugin XSLT customization and your custom.xsl would define an xsl:output which omits the XML declaration:
Code: Select all
<xsl:output method="xml"
encoding="UTF-8"
indent="no"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" omit-xml-declaration="yes"/>
https://github.com/oxygenxml/dita-embed-html
But I have not tested this, so it might not work.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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