W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 1998

Output instance well-formedness

From: G. Ken Holman <gkholman@CanadaMail.com>
Date: Tue, 20 Oct 1998 13:21:15 +1000
Message-Id: <Version.32.19981020131758.00de6a80@CraneSoftwrights.com>
To: XSL Editors <xsl-editors@w3.org>
Hi!

I would like to ensure in my script that the output XML instance from an
XSL translation correctly include the XML declaration.

When I tried the following, an implementation of XSL complained about the
misplaced XML declaration (the one in the template):

<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/TR/WD-xsl"
  xmlns:bin="http://mycompany.com/Bin"
  result-ns="bin"> 
  <xsl:template match="/">        <!--getting started-->
    <?xml version="1.0"?>
    <bin:thing1>
      <xsl:process-children/>
    </bin:thing1>
  </xsl:template>
  <xsl:template match="para">
    <bin:thing2 attr1="thisattr"> <!--new objects-->
      <xsl:process-children/>
    </bin:thing2>
  </xsl:template>
</xsl:stylesheet>

Is the burden on the XSL processor to emit the XML declaration for the
output instance?

Thanks!

.............. Ken


--
G. Ken Holman               mailto:gkholman@CanadaMail.com
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/s/
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Training:   http://www.CraneSoftwrights.com/s/schedule.htm
Resources: http://www.CraneSoftwrights.com/s/resources.htm
Shareware: http://www.CraneSoftwrights.com/s/shareware.htm
Received on Tuesday, 20 October 1998 09:47:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT