Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
XML datafile + XSLT = WAP? Could it be that easy? Darkelve
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?
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
I'm finally getting somewhere... phew.
XML datafile + XSLT + content type changing (via asp) = WAP indeed!
This topic can be closed.