You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Marco <br...@tin.it> on 2004/06/11 11:49:02 UTC
Xalan XHTML output (bug?)
If I use
<xsl:output method="xml" version="1.0" encoding="iso-8859-1"
indent="yes" omit-xml-declaration="no" doctype-public="-//W3C//DTD XHTML
1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
xalan:indent-amount="3" />
Xalan transforms all the empty
<element></element>
in
<element />
That's right for all the EMPTY elements of the xhtml language (as br,
hr, input). But (according to the xhtml DTD) some elements (as div)
require a separate closing tag.
This usually causes BIG browser problems...
Try the following xhtml in your browser:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
</head>
<body>
<div style="background-color: yellow;">
<div />
</div>
<p>test</p>
</body>
</html>
The test paragraph shouldn't have a yellow background, but it has
(tested on IE and Firefox).
Is there an option to say "Xalan don't touch all those
<element></element> !"?
Thanks,
Marco