|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Omitting XML declaration (xt and Saxon experiences)
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








