Deja Vu all over again, or, Re: Update re: Outputting a DOCTYPE

Subject: Deja Vu all over again, or, Re: Update re: Outputting a DOCTYPE
From: "White, David" <David.White@xxxxxx>
Date: Mon, 11 Oct 1999 15:15:10 +0200
This is how I did it. I sure hope this still works with the latest XT. Let
me know if not.

David White
CONNECT AUSTRIA

-----Original Message-----
From: White, David 
Sent: Tuesday, September 21, 1999 3:27 PM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: RE: Need XML output with <!DOCTYPE ... , HOW to do that ?


> Hi there,
> 
> I just need the following XML result from a XSL processing :
> 
> <!DOCTYPE root PUBLIC "imediation/protocol" "protocol.dtd">
> <root>
> 	&protocol;
> </root>
> 
> What's the Style Sheet needed to obtain such result ?

Ahh, this. Since you are using XT, I can say that the following:


	<xsl:template match="/">
<xsl:processing-instruction
name='xml'>version="1.0"</xsl:processing-instruction>
<xsl:text disable-output-escaping="yes"><![CDATA[
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml";>]]>
</xsl:text><wml>
	<xsl:apply-templates/>
</wml>

	</xsl:template>

works, in that it produces:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml";>
<wml>
	[stuff]
</wml>

Horrible, isn't it?

I hope the next version of XT supports xsl:output. I find the above
extremely inelegant.

Dave


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread