[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

question about transformation


Subject: question about transformation
From: "Yannick Nicolas" <yannick@xxxxxxxxxxxxxxxx>
Date: Mon, 22 Nov 1999 15:23:21 +0000

Hello people!
I'm quite new to XML and XSL, and I've got one problem.
I've written a simple stylesheet to transform an XML document into another
XML document that have a different dtd.
I want to include at the begin of the transformed document the XML reference.
If I want to put a tag, I just write in my stylesheet something like:

  <xsl:template match="paragraph">
    <p>
      <xsl:apply-templates/>
    </p>
  </xsl:template>

but if I want to include my dtd reference, I try with a XSLT stylesheet like:

 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">

  <xsl:template match="body">
    <?xml version="1.0"?>
    <!DOCTYPE btml PUBLIC "http://www.btml.org/DTD/btml0.6.xml">
    <b>
      <xsl:apply-templates/>
    </b>
  </xsl:template>


my initial document looks like :

    <?xml version="1.0"?>
    <!DOCTYPE ktml PUBLIC "http://www.btml.org/ktml/DTD/ktml0.1.xml">
    <body>
       this is the body
    </body>


I want my final document to look like:

    <?xml version="1.0"?>
    <!DOCTYPE btml PUBLIC "http://www.btml.org/DTD/btml0.6.xml">
    <b>
       this is the body
    </b>


I've got an error in my stylesheet at the begin of "?xml..." and at the begin
of "<!DOCTYPE...". I don't understand why I can't include in my final document
a tag that starts by "<?" or "<!"
Can someone explain me ?
Thank you!

Yannick Nicolas, software engineer
yannick@xxxxxxxxxxxxxxxx


Adresses gratuites et illimitées sur http://bretagne.zzn.com
__________________________________________________________________________________
Constituez votre propre service d'e-mail sur le Web à l'adresse http://www.zzn.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords