[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XHTML to WML transformations problems.

Subject: XHTML to WML transformations problems.
From: "Paul Healy" <sebalut@xxxxxxxxxxx>
Date: Tue, 23 Aug 2005 00:04:41 +0000
wml ul
Hi I have rewritten my question as the original post was a mess. I am trying to write a style sheet to convet my source XHTML doc into a WML result document with XSLT. I have tried looking online for resources but unfortunately XHTML to WML is not covered in detail. If anyone could please look through my work and advise me on what to do, I would be very very grateful. This is my source XHTML file.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
   <title>XSLT transformations</title>
   <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>
   <div id="sidebar">
     <ul>
       <li><a href="index.html">Home</a></li>
       <li><a href="products.html">Product Page</a></li>
       <li><a href="Offers.html">Offers</a></li>
     </ul>
   </div>
 </body>
</html>

The XSL document is:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml_1.3.xml">
</xsl:text>
<wml>
<card id="card1" title="{head/title}">
<option>
<xsl:for-each select="body/div/ul/li">
<a href="#{generate-id(a)}">
<br/>
<xsl:apply-templates />
</a>
</xsl:for-each>
</option>
</card>
</wml>
</xsl:template>
</xsl:stylesheet>


Basically I want to create a WML document from the source XHTML document. This is for a research project and I am currently stuck on this problem. I want to create a list of

<a href="#index.wml">Home</a><br/>
<a href="#products.wml">Products</a><br/>
<a href="#offers.wml">Offers</a><br/>

in the result document, that is creating a list of links to three other WML cards. I know this probably doesnt seem very complicated but I have been working for days on it and I still cant figure it out, and my deadline is up in a weeks time. Would be very very grateful if anyone could please provide me with some help. Thanks in advance.

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.