W3C home > Mailing lists > Public > www-html@w3.org > May 2003

Re: Using RELAX NG in XHTML 2.0

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Thu, 15 May 2003 18:56:20 +0900 (JST)
Message-Id: <20030515.185620.41651352.mimasa@w3.org>
To: www-html@w3.org

Karl Ove Hufthammer <karl@huftis.org> wrote:

> I agree. Requiring DTD validity to be a conforming XHTML document
> means that we can have two canonically equivalent XHTML documents,
> where one is valid (and conforming), and the other is not.
> Example:
> Document 1:
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xml:lang="en-GB">...</html>
> Document 2:
> <prefix:html xmlns:prefix="http://www.w3.org/1999/xhtml"
>              xml:lang="en-GB">...</html>
> These are equivalent, but only the first would be valid XHTML 1.0.

Well, to that extent it's possible with modular DTD like XHTML 1.1, e.g.

Document 1:

<html xmlns="http://www.w3.org/1999/xhtml"

Document 2:

<!DOCTYPE prefix:html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
<!ENTITY % NS.prefixed "INCLUDE">
<!ENTITY % XHTML.prefix "prefix">
<prefix:html xmlns:prefix="http://www.w3.org/1999/xhtml"

and both can be valid.  Whatever it would end up, the XHTML 2.0 DTD
will also include the same facility.

Of course this parameter entity trick is messy, and will quickly
become unmanageable to most authors, especially for "hybrid"
document types.

An almost unknown fact is that the XHTML+MathML+SVG DTD [9] can
manage 23 different combination of various profiles of
XHTML/MathML/SVG with just one DTD driver through parameter entity
tricks, but I don't think sane people should bother with that.
It's certainly an over-engineering, the editor must be crazy.
And despite such insane effort, there are certain things that
DTD can't manage [10].

Compared to this monstrous DTD driver full of parameter entity
tricks, an XHTML2+MathML+SVG driver in RELAX NG would be just
like this:


And it's free from namespace limitations.  I would be very surprised
if anyone find DTD version easier to understand.

[9] http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020809/#dtd
[10] http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020809/#bugs

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Thursday, 15 May 2003 05:56:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:03 UTC