Subject:DOCTYPE public and system info runs together Author:Tracey Zellmann Date:17 Oct 2007 09:40 AM
I am having a problem with DOCTYPE. As an example, I want to create a HTML 4.01 Transitional page. I establish the stylesheet with this statement
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Then I use this statement to create the DOCTYPE
<xsl:output doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd" method="html" indent="yes" encoding="ISO-8859-1" media-type="text/html"/>
The problem is that the two quoted fields are run together. Although the pages render successfully, they fail validation.
I am using a fairly straight-forward java program using the standard material in JDK 1.5. I find that I can solve the problem by going to XSLT 2.0 and using the saxon8.jar for the transformer. For a variety of reasons, I would like to avoid that.
The Xalan embedded in JDK 5 has shown a few difficulties; we hope
you can work around it. Although the one in JDK 6 is better, it
is still based on an older version of Xalan than is available
directly from Apache.