Re: "snapshot" XHTML DTD for all current modules?

olivier Thereaux wrote:

> Worse(?) perhaps is the current observed trend of sites
> using an XHTML 1.0 doctype, but adding features from ARIA,
> RDFa or other interesting modules.

"Worse" only from the POV of a DTD driven validator.

> We all know how DTDs are not very compatible with ideas
> of extensibility, but it seems a pity that there is not,
> at this point, any way to either:

> - declare a doctype that allows one to mix those features
> or
> - not declare any doctype at all, but have the xmlns place
> the document in the xhtml namespace.

"Mixing" could be a hopeless case.  When I looked at your
*apparently* harmless example of supporting "xsi" my first
thought was "wait a moment, where I used that I didn't pick
'xsi' but 'use' as shorthand".  The discussed DTD supported
this by overwriting the shorthand in a DTD subset, but IMO
that's clumsy.

You can throw in xml:role or similar if you don't have this
already, but generally I fear DTD validation is at its limit,
with the missing URL syntax check as prominent example.

> As far as checking tools are concerned: I would like a way
> for a tool to say “your document (may not be strictly
> conforming foo but it) is properly using mixed features
> from the XHTML family.”

Maybe you can identify a subset where that could still work.

E.g. support documents where the empty namespace is only
used for XHTML proper, nothing else, and for anything else
you could check if the shorthand is at least declared ("xsi"
or similar), with "xml" as special case because you have it
already for xml:lang and xml:space.  Maybe you could add
xml:id checks = must not clash with any XHTML id, and must
not be used in XHTML proper elements, or can it ?

 Frank

Received on Tuesday, 6 May 2008 09:08:54 UTC