homepage Welcome to WebmasterWorld Guest from 54.167.182.201
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
Forum Library, Charter, Moderators: bakedjake

Smartphone, Wireless, and Mobile Technologies Forum

    
XML datafile + XSLT = WAP?
Could it be that easy?
Darkelve

10+ Year Member



 
Msg#: 3152326 posted 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

10+ Year Member



 
Msg#: 3152326 posted 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"))

'Load XSL
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'>"

'Transform file
Response.Write(xml.transformNode(xsl))
%>

Darkelve

10+ Year Member



 
Msg#: 3152326 posted 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved