[xsl] Transforming XHTML to WML

Subject: [xsl] Transforming XHTML to WML
From: "Paul Healy" <sebalut@xxxxxxxxxxx>
Date: Mon, 22 Aug 2005 05:40:42 +0000
Hi everyone I am a new XSLT user and I have been trying to convert an XHTML page to WML for the last week. I have been looking for help on the web but there isnt very much documentation on this particular tranformation. I would be very grateful if someone could please take a look at my code and provide some guidance as I dont have much experience with XSLT. I am using a Saxon 6-5-4 processor and Stylesheet version 1.0.
This is the XHTML code
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<title>XSLT transformations</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<div id="sidebar">
<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>
The XSL code is
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
<xsl:output method="xml" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
"http://www.wapforum.org/DTD/wml_1.3.xml"&gt; </xsl:text>
<card id="card1" title="{html/head/title}">
<p align="center">
<xsl:for-each select="div/ul/li">
<a href="#{generate-id(a)}"><br/>
<xsl:value-of select="."/>

I know I have made a lot of mistakes with the XSLT but I`m stumped. It produces a WML file which wont render on my emulator,NMB4.0, saying WML encoder cant be child content? There is not much literature for XHTML to WML conversions so any help is very very appreciated.

Thanks in advance.

It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk

Current Thread