Welcome to WebmasterWorld Guest from 126.96.36.199 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
XML datafile + XSLT = WAP? Could it be that easy? Darkelve msg:3152328 10:26 am on Nov 10, 2006 (gmt 0) For a website I maintain, I've got a column with newspicks which is completely generated with XML (XML datafile) and XSLT (template for the xhtml page). ASP takes care of the conversion.
Now I was wondering, if I could apply another XSLT file to create a specific WAP version of this part of my site, so that I can offer a page with updates news-titles to people with WAP-enabled mobile phones?
Darkelve msg:3152419 12:52 pm on Nov 10, 2006 (gmt 0)
Well, I found a tutorial about this online, and came up with the code below.
However, when I load the page, the browser (both Mozilla and Internet Explorer) asks me whether I want to open or save the file.
Is this normal? Will a WAP browser handle this correctly?
'Load XML Set xml = Server.CreateObject("MSXML2.DOMDocument") xml.async = false xml.load(Server.MapPath("wml.xml"))
Set xsl = Server.CreateObject("MSXML2.DOMDocument") xsl.async = false xsl.load(Server.MapPath("wml.xsl"))
Response.ContentType = "text/vnd.wap.wml"
Response.Write "<?xml version='1.0'?>" Response.Write "<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 'http://www.wapforum.org/DTD/wml_1.1.xml'>"
Response.Write(xml.transformNode(xsl)) %> Darkelve msg:3156025 10:17 am on Nov 14, 2006 (gmt 0)
I'm finally getting somewhere... phew.
XML datafile + XSLT + content type changing (via asp) = WAP indeed!
This topic can be closed.