[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML to WML using Oracle XSLT and Nokia
Does anyone have a very simple example of an XSLT which will produce WML output readable by the Nokia phone emulator when run on the Oracle parser? Here is my attempt at "Hello World". <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="-//PHONE.COM//DTD WML 1.1//EN" doctype-system="http://www.phone.com/dtd/wml11.dtd" /> <xsl:template match = "/"> <wml> <card id="hello" title="Hello"> <p>Hello </p> </card> </wml> </xsl:template> </xsl:stylesheet> Run this on any valid XML document with the Oracle parser and you get: <wml> <card id="hello" title="Hello"> <p>Hello </p> </card> </wml> The Lotus parser does slightly better and gives you: <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.phone.com/dtd/wml11.dtd"> <wml> <card id="hello" title="Hello"> <p>Hello </p> </card> </wml> But the Nokia emulator complains unless it receives the code: <?xml version = "1.0" ?> <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.phone.com/dtd/wml11.dtd"> <wml> <card id="hello" title="Hello"> <p>Hello </p> </card> </wml> Now you might think including the line: omit-xml-declaration="no" might be helpful, but the Oracle parser seems to ignore this (at least this is better than the Lotus processor, which throws an exception). Anyone know how to get this to work? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|