xsl-list
[Top] [All Lists]

Re: [xsl] XHTML html validation

2007-02-16 04:40:58
Abel Braaksma wrote:
method="xml" does not output the doctype-public if you do not also supply a doctype-system method="xhtml" does not output the doctype-public if you do not also supply a doctype-system

I am not sure if this is according to the W3 specs of xsl:output, I'll have to check. It strucks me as a bit odd that the doctype-public is ignored for xml and xhtml, unless there's also a doctype-system. But I thought that these are not needed together, but my doctype knowledge is a bit rusty.


Seems like I remembered wrongly, it isn't odd at all. This is what the specs say about it for XML and XHTML (only read for XSLT 2, but my guess is, for XML it is the same for both):

http://www.w3.org/TR/xslt-xquery-serialization/#XML_DOCTYPE says:
"The doctype-public parameter MUST be ignored unless the doctype-system parameter is specified."

this behavior is equal for XHTML and XML (logically so: XHTML *is* XML, so they obey the same rules for most parts).

I don't know what processor you are using, but it is clearly doing the wrong thing. About the first element the spec says:

"The name following <!DOCTYPE MUST be the name of the first element, if any"

which clears the clouds on that one.

I can only talk for Saxon, which does the correct thing there. Your best bet is to check the mailing lists or buglists of the processor you are using, or try another processor.

HTH,
-- Abel Braaksma

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--