Re: [xsl] JDK14/JDOM: generating a DOCTYPE decl. in output?

Subject: Re: [xsl] JDK14/JDOM: generating a DOCTYPE decl. in output?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 16 Mar 2002 10:27:41 GMT

If you are generating HTML 4, you don't want to force the xml output
method

 <xsl:output method="xml" indent="yes" encoding="utf-8"
  doctype-public="-//W3C//DTD HTML 4.01//EN"
  doctype-system="http://www.w3.org/TR/html4/strict.dtd";
  omit-xml-declaration="no" />

otherwise there will be no way to get HTML syntax for empty elements,
script elements etc.
If you change that to method="html" (which would be the default anyway)
the output will use HTML syntax and also automatically add a
specification of the encoding used into the head element.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Current Thread