> Its strange but my cell phone does not open > http://xxx/cocoon/samples/hello-world/hello.wml saying: 1019 Compile Error > What's the matter?
Several cell phone microbrowsers are NOT strictly WML compliant, in spite of the fact that they say they are. I have seen the above problem with the Phone.Com (aka OpenWave) UP.Browser. Its really pretty inexcusable for the browser to be so fragile considering that the phone is not doing any of the WML parsing; a proxy server is doing it. I did some experimenting and found that the UP browser does not like the DOCTYPE prologue. My solution for dealing with this was to create a psuedo-browser type, wapx by changing the browser useragent="UP" line to the following in the sitemap.xmap browser selector section: <browser name="wapx" useragent="UP"/> <!-- broken WML browser, does not like the DOCTYPE prologue --> and then to use the HTML serializer instead of the WML one for a "wapx" browser, e.g.: ... <map:select type="browser"> <map:when test="wap"> <map:transform src="stylesheets/{level}_wml.xsl" /> <map:serialize type="wml"/> </map:when> <map:when test="wapx"> <map:transform src="stylesheets/{level}_wml.xsl" /> <map:serialize type="html"/> </map:when> <map:otherwise> <map:transform src="stylesheets/{level}_html.xsl" /> <map:serialize type="html"/> </map:otherwise> </map:select> ... I could have removed the DOCTYPE parameters from the wml serializer in the sitemap, but I wanted to preserve the ability to work with WML browsers that are standards compliant. (The above sitemap excerpt is from a site that uses Cocoon 2 in order to provide access to the entire site -- XML, XSP, and Servlets -- to HTML and WML browsers http://www.caphnet.com/ ). -- Dr. Everett (Skip) Carter Phone: 831-641-0645 FAX: 831-641-0647 Taygeta Scientific Inc. INTERNET: [EMAIL PROTECTED] 1340 Munras Ave., Suite 314 WWW: http://www.taygeta.com Monterey, CA. 93940 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>