Re: [xsl] Transforming XHTML to WML

Subject: Re: [xsl] Transforming XHTML to WML
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 22 Aug 2005 06:53:44 +0100
>>>>> "Paul" == Paul Healy <sebalut@xxxxxxxxxxx> writes:

    Paul> The XSL code is <?xml version="1.0" encoding="utf-8"?>
    Paul> <xsl:stylesheet version="1.0"
    Paul> xmlns:xsl="";>
    Paul> <xsl:output method="xml" /> <xsl:template match="/">
    Paul> <xsl:text disable-output-escaping="yes"> &lt;!DOCTYPE wml
    Paul> PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
    Paul> ""&gt; </xsl:text>
    Paul> <wml> <card id="card1" title="{html/head/title}"> <p
    Paul> align="center"> <option> <xsl:for-each select="div/ul/li">
    Paul> <a href="#{generate-id(a)}"><br/> <xsl:value-of select="."/>
    Paul> </a></xsl:for-each></option></p></card></wml>
    Paul> </xsl:template> </xsl:stylesheet>

I don't know anything about wml, so I can't answer that part
(hopefully someone will).

But you should not use <xsl:text disable-output-escaping="yes"> to
produce a Document Type Declaration (actually, the simple rule is to
NEVER use disable-output-escaping).

Instead, spcify the doctype-system and doctype-public on the
xsl:output declaration.

Colin Adams
Preston Lancashire

Current Thread