tags:

views:

197

answers:

1

I am transforming an XML file to WML using XSLT. Everything is fine until I try to open the WML in M3Gate. It gives the error "Bad WML syntax. 'Fatal Error. Ln 1, Col 38 Expected whitespace'."

Here is the offending code. However, I've tried moving things around and it gives the same error.

<?xml version="1.0" encoding="UTF-16"?> 

    <wml>

        <card id=...>

Is this some obscure problem I'm missing? I've compared it with a WML I've made previously and the first line is exactly the same.

It works perfectly in Opera Web Browser.

A: 

Silly me. Opera Browser ignores the fact that there is no DOCTYPE declaration, however M3Gate generates this obscure error message. Add the following to your code, beneath the xsl:stylsheet element

<xsl:output method="xml" doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml" 
doctype-public="-//WAPFORUM//DTD WML 1.1//EN"/>
pypmannetjies