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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--