I am using php XSLTProcessor to make transformations of specific parts of XML file that I need to incorporate as a content inside another HTML document.
The problem is that XSLTProcessor always emits code like this:
<head>
<body>
[what I need to incorporate]
</body>
</head>
I need to prevent it from generating those surrounding tag, how can I do this?
Have you tried not to use the html output method?
I would try:
<xsl:output method="xml"/>
If your XSLT processor allows custom XMLWriter classes, you may write such a class that enforces certain lexical forms (such as certain elements not having a short form or writing <br /> and never <br></br>), if such are required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With