This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSL for XML to WML
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: XSL for XML to WML
- From: Vinay Jaiswal <jvinay at rnd dot cts-corp dot com>
- Date: Sat, 15 Jul 2000 18:59:42 -0000
- Reply-To: xsl-list at mulberrytech dot com
Hi all,
I'm writing XSL for conversion from XML to WML. I'm having one XML
document.
Since whole information cann't be displayed in one card in WML. I want to
show
titles(headings) in first card and text to be linked to headings. If
client needs to know
more about a particular title, he has to click that title.
XML file:
<?xml version="1.0"?>
<?xml-stylesheet href="htmlxrnd.xsl" type="text/xsl"?>
<?xml-stylesheet href="wmlxrnd.xsl" type="text/xsl" media="wap"?>
<?cocoon-process type="xslt"?>
<article>
<title>What is New</title>
<section>
<title> Cognizant </title>
<subtitle>Cognizant APN 2000 Project</subtitle>
<mpara>This project to be comple....</mpara>
<subtitle>TIPHON Project</subtitle>
<mpara> To be done by....</mpara>
</section>
<section>
<title>Telecom Projects</title>
<mpara>text....................</mpara>
<pi>COVAD</pi>
<pi>DataNet</pi>
<pi>Vertek</pi>
<pi>Sch...</pi>
</section>
<section>
<title>Linux Projects</title>
<mpara>Cognizant started a </mpara>
<pi>America II</pi>
<pi>Hewit</pi>
</section>
<section>
<title>Quality Process</title>
<mpara>All the projects executed by R and other specific Competency centers
will follow the process. </mpara>
</section>
</article>
I want following headings to be displayed in first card......
What is New
Cognizant
Cognizant APN 2000 Project
TIPHON Project
Telecom Projects
Linux Projects
Quality Process
If client wants more informatin, he has to click particular project....How
to write stylesheet(XSL)? I've
written like this...
<xsl:template match="/">
<wml>
<card id="rnd">
<p align="center">
<xsl:apply-templates/>
</p>
</card>
</wml>
</xsl:template>
<xsl:template match="article/title">
<p><b><center><h1><xsl:apply-templates/></h1></center></b></p>
</xsl:template>
<xsl:template match="article/section/subtitle">
<p><b><I><xsl:apply-templates/></I></b></p>
</xsl:template>
<xsl:template match="section/title">
<p><b><h2><I><xsl:apply-templates/></I></h2></b></p>
</xsl:template>
<xsl:template match="section/pi">
<xsl:apply-templates select="d"/>
</xsl:template>
<xsl:template match="mpara">
<xsl:apply-templates select="d"/>
</xsl:template>
thanks in advance
Vinay Jaiswal
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list