I am transforming a idml file into a xml in my project.I have an issue on extra xml declaration. Here is the part of idml file :`
<Content> <?xml version="1.0" encoding="UTF-16"
standalone="yes"?>
<math>
</math></Content>
` This is the output I am getting after transformation:
<?xml version="1.0" encoding="UTF-8"?>
<content>
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<math></math>
</content>
My task is to replace < and > with < and >,then I got this issue..
I tried lots of ways to do this(not standard things)..Finally I tried to replace word xml replace with space and convert this to PI and transform PI in post processing mode..but it also was not succeeded
<xsl:template match="Content">
<xsl:if test=".[contains(text(),'math')]">
<xsl:value-of select="replace(./text(),'xml','')”/>
</xsl:if>
</xsl:template>
Output I want to generate:
<?xml version="1.0" encoding="UTF-8"?> <content><math></math></content>
And I am using Saxon 9.7.0HE for my development.
Please help me to solve this issue..Thank you..!
In a
version="3.0"stylesheet, you could usehowever with your input snippet, that is not working, as the contents is not well-formed, given the

character before the root element of the escaped markup. So it is not quite clear what kind of content you have there, if it is not an XML document nor an XML fragment then neitherparse-xmlnorparse-xml-fragmentwill help.