Use:

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

  <xsl:output method="xml"
              doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
              doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml";
              media-type="right-type-for-wap"/>

   <xsl:template match="/">
      <wml>

        <!-- Etc. -->

      </wml>
   </xsl:template>

    <!-- Etc. -->

</xsl:stylesheet>

If your XSLT Engine supports the <xsl:output>
as per the XSLT 1.0 Recommendation, this should
produce the desired output. I know the Oracle
XSLT engine does, and I'm nearly positive that
Xalan, Saxon, and XT (some parts of <xsl:output>)
do too.

_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Development Team

----- Original Message ----- 
From: "Mike Chan" <[EMAIL PROTECTED]>
To: "xerces-dev" <[EMAIL PROTECTED]>
Sent: Wednesday, February 09, 2000 5:58 PM
Subject: Problem transforming XML into WML with XSL


| Hi All,
| 
| I would like to transform my XML doc into a WML doc. Because the WML doc
| itself is another XML doc, I have to include <?xml version="1.0"> tag
| and the <!DOCTYPE ...> tag at the very beginning.  However, this causes
| problem when I apply the following XSL stylesheet:
| 
| <?xml version="1.0"?>
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
| 
|    <xsl:template match="/">
|       <?xml version="1.0"?>
|       <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
| "http://www.wapforum.org/DTD/wml_1.1.xml";>
|       <wml>
|  <head>
|     <meta http-equiv="Cache-Control" content="no-cache" forua="true" />
|  </head>
|  <card title="card1" newcontext="false" ordered="false">
|     <p>
|              <xsl:apply-templates/>
|     </p>
|  </card>
|       </wml>
|    </xsl:template>
| 
| what should I do to insert another <?xml ...?> tag into the transformed
| XML doc?
| 
| Many thanks
| 
| Mike
| 
| 

Reply via email to