Re: [xsl] Outputting Doctype

Subject: Re: [xsl] Outputting Doctype
From: George Cristian Bina <george@xxxxxxxxxxxxx>
Date: Thu, 16 Mar 2006 12:41:15 +0200
See xsl:output/@doctype-system and xsl:output/@doctype-public.

Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Aaron Johnson wrote:

Hello...


I want to add a doc type to my xsl so that the final html output will be
xhtml compliant.

I am passing in the doctype [ escaped ] as aparameter...

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; /&gt;

...and then applying a template...

<xsl:template name="doctype">
     <xsl:value-of select="$doctype"/>
</xsl:template>

But getting this result in the output:

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; /&amp;gt;

Is there a correct way to implement a doctype for output?

Thanks!

..................................................................

Aaron Johnson
GUI / XSLT development
Academic Technologies Group [ATG]
University of the West of England
0117 3281051 [ext: 81051]
atg.uwe.ac.uk/aaron

SECURITY POLICY:

Please note that ATG will only accept
e-mail attachments in the following
formats:


.asp,.bin,.doc,.gif,.html,.jpg,.mdb,.png,
.psd,.shtml,.sdf,.sit,.xls,.xml,.xsd,.xsl,.zip,

..................................................................

3In a wireless world without boundaries...
...who needs Gates and Windows?2

..................................................................

This communication is intended solely
for the use of the individual(s) to whom
it is addressed. Any opinions presented
are those of the author and do not
necessarily represent the University of
the West of England, Bristol.
..................................................................



This email has been independently scanned for viruses and any virus software has been removed using McAfee anti-virus software

Current Thread