This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Omitting XML declaration (xt and Saxon experiences)
- To: <xsl-list at mulberrytech dot com>
- Subject: Re: Omitting XML declaration (xt and Saxon experiences)
- From: "Bill Rishel" <illusyn at nwlink dot com>
- Date: Thu, 24 Feb 2000 21:49:21 -0800
- References: <NDBBICIANKAGJHIJIGFJEELACJAA.paul.beer@backsoft.com>
- Reply-To: xsl-list at mulberrytech dot com
Regarding <xsl:output method="xml" omit-xml-declaration="yes"/>:
I have been using xt for about 3 months, but just two days ago started
working with Saxon because I need the evaluate() extension function.
I have not been able to coerce Saxon into omitting the xml declaration.
With xt I do not have the problem.
If I use
<saxon:output file="{$filename}" omit-xml-declaration="yes" method="xml">
within a template for directing output to files the xml declaration still
appears
also.
Incidentally, xt is a very fine tool by my experience -- I can't think of
any
significant problem with it -- and aside from this one xml declaration
problem
saxon has been a real pleasure so far.
-Bill
-------------------
Example source:
XML:
<?xml version="1.0"?>
<EMPTY>
</EMPTY>
xt stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xt="http://www.jclark.com/xt"
extension-element-prefixes="xt">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:text>this is the first line of output</xsl:text>
</xsl:template>
</xsl:stylesheet>
xt output:
this is the first line of output
Saxon stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon"
>
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:text>this is the first line of output</xsl:text>
</xsl:template>
</xsl:stylesheet>
Saxon output:
<?xml version="1.0" encoding="utf-8" ?>this is the first line of output
> > does anyone know how to make an xsl transformation NOT
> > display the first
> > line :
> >
> > <?xml version="1.0" encoding="UTF-8"?>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list