Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xsltproc pre appending <?xml version="1.0"?>

Tags:

xslt

All of my output has <?xml version="1.0"?> in front of my intended output. How do I get rid of this? I have looked at different flags but I can't find anything relating to this.

Some extra details:

  • Using fedora 8
  • [a@...]$ xsltproc -V
  • Using libxml 20702, libxslt 10120 and libexslt 813
  • xsltproc was compiled against libxml 20702, libxslt 10120 and libexslt 813
  • libxslt 10120 was compiled against libxml 20702
  • libexslt 813 was compiled against libxml 20702
like image 369
Liver Avatar asked Dec 28 '22 09:12

Liver


2 Answers

There is an attribute on xslt:output called "omit-xml-declaration"

For example:

<xsl:output method="html" omit-xml-declaration="yes" />

That should remove it.

like image 136
dash Avatar answered Jan 22 '23 17:01

dash


IIRC, it's omit-xml-declaration="yes" in <xsl:output />.

like image 22
Michael Krelin - hacker Avatar answered Jan 22 '23 17:01

Michael Krelin - hacker