RE: XHTML DOCTYPE and xmlns

Evan Lenz wrote:
> 
> DOCTYPE declarations and namespace declarations are not the same thing, nor
> do they necessarily depend on one another.  I would like to output XHTML
> without a DOCTYPE declaration, but *with* an XHTML namespace declaration.
> 
> I'm using JTidy.  I see that in Lexer.java the setXHTMLDocType() method is
> what's responsible for calling fixHTMLNameSpace() to include the namespace
> declaration.  If the doctype mode is set to "omit", regardless of whether
> setXHTML(true) was called, the method returns without calling
> fixHTMLNameSpace().  Since they're two separate things, shouldn't
> fixHTMLNameSpace() be called regardless of whether the doctype mode is
> "omit"?  The answer to this seems to be to move the fixHTMLNameSpace()
> method call to the top of the setXHTMLDocType() method.

This fix works for us, too.  (We also want the XHTML namespace but not
the DTD.)

--Randy

Received on Wednesday, 6 September 2000 13:14:02 UTC