This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes want to generate wml file from a xsl file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "want to generate wml file from a xsl file" Watch "want to generate wml file from a xsl file" New topic

want to generate wml file from a xsl file

Simon Johnn

Joined: Mar 23, 2003
Posts: 15
i want to generate wml file from a xsl file:-
<?xml version="1.0"?>
<greeting>Hello World</greeting>

<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl: output method="wml"/>
<xsl:template match="/">
<card id="greeting" title="Hello World">
<xsl:apply-templates select="greetings/greeting">
<xsl:template match="greeting">
<xsl:value-of select="."/>
I used the greeting.xml and greeting.xsl to generate greeting.wml file by using two XSLT processors:-
2-Clark's XT
but unable to generate the wml file from both of them,none of the XLLT processors generate the wml file.
Can anyone help me in generating the wml file using XSLT processor.Plz let me know from which processor i can do this and what will be the procedure.
Thanks in advance
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Here are the changes u need to make in ur xsl file
1.There is no space between 'xsl:' and 'output'
2.u cant have just <p>. u need to use it as <p/> or <p></p>. remember in xml, u cant have tags which are not closed.
3.xsl:apply-templates is not closed.
4. also xsl utput method supports 3 values for its 'method' attribute. html,xml,text. I am not sure if u can have wml. but if u specify 'html' there it will very well generate a wml file the way u wanted. others any insights??
I agree. Here's the link:
subject: want to generate wml file from a xsl file
It's not a secret anymore!