You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Dave <LI...@sheffield.ac.uk> on 2000/07/17 00:12:37 UTC

XSL: XML, WML, Servlet (Help me!)

Hi,
I am quite new to Xalan.

I'd like to convert XML into WML with servlets.
To do this, I tried the following test, i.e.:

<xsl:output method="xml" verison"1.0"/> 
<xs:template match="/">
	<xsl:apply_templates/>
</xsl:template>
<xsl:template match="doc">
	<![CDATA[
	<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 	
	1.1//EN"
	"http://www.wapforum.org/DTD/wml_1.1.xml"> 
	]]>
	<wml>
	   ...
	</wml>
</xsl:template>
</xsl:stylesheet>

The result is: "less than" sign, i.e., "<", is always misinterpreted.
I also tried with "&lt;" instead of using "<" in the above example, 
but the result is the same.

Are there any other ways to get DOCTYPE for WML?

It would be appreciated very much if I could get any help.

Thanks.
Dave.

RE: XSL: XML, WML, Servlet (Help me!)

Posted by Dong-Won Lee <li...@sheffield.ac.uk>.
Hi Gary,

Now,it works!
Thank you very much (^o^).

Dave.


Re: XSL: XML, WML, Servlet (Help me!)

Posted by Gary L Peskin <ga...@firstech.com>.
Dave --

Replace the xsl:output element with:

  <xsl:output method="xml" version="1.0"
    doctype-system="-//WAPFORUM//DTD WML 1.1//EN"
    doctype-public="http://www.wapforum.org/DTD/wml_1.1.xml" />

Then, delete all of the CDATA stuff.

Gary

Dave wrote:
> 
> Hi,
> I am quite new to Xalan.
> 
> I'd like to convert XML into WML with servlets.
> To do this, I tried the following test, i.e.:
> 
> <xsl:output method="xml" verison"1.0"/>
> <xs:template match="/">
>         <xsl:apply_templates/>
> </xsl:template>
> <xsl:template match="doc">
>         <![CDATA[
>         <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML
>         1.1//EN"
>         "http://www.wapforum.org/DTD/wml_1.1.xml">
>         ]]>
>         <wml>
>            ...
>         </wml>
> </xsl:template>
> </xsl:stylesheet>
> 
> The result is: "less than" sign, i.e., "<", is always misinterpreted.
> I also tried with "&lt;" instead of using "<" in the above example,
> but the result is the same.
> 
> Are there any other ways to get DOCTYPE for WML?
> 
> It would be appreciated very much if I could get any help.
> 
> Thanks.
> Dave.