Output instance well-formedness

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 UTC