Re: Verbosity of XHTML 2

Thanks for your comments.

Christian Wolfgang Hujer <Christian.Hujer@itcqis.com> wrote:

> Long:
> 
> Why not simply require XHTML 2.0 user agents to be validating?

There isn't a single notion of validity anymore, something might be
DTD-valid or Schema-valid or something else, and none of them gives
you all the relief, unfortunately.

So far we've required *documents* be DTD-valid, but didn't require
user agents to be validating UAs, and in fact many of XHTML UAs
(Gecko-based browsers, Opera, ...) are non-validating UAs.
It is the author's responsibility to make sure that the document is
valid, and UAs would throw away the document if it's not well-formed.

> This would solve:
> 1. The namespace problem

Not really.  By requiring DTD-validity, you have to cope with
really nasty namespace tricks in DTD.  I guess most people don't
(want to) understand what the XHTML+MathML+SVG DTD driver is
dealing with, and if we are ever able to write a DTD for XHTML 2,
most probably it's even more complex than that.

And be aware that XML Schema cannot provide default values for
namespace declarations.  Neverthelss XForms has heavy dependency
with XML Schema, so we can't get away from that.

> Validation should not be a traffic problem since fetching the DTD is not required if a user agent has a catalog mapping the public identifiers (of the files that make up the external subset of the XHTML 2.0 document type definition) to its own copy of the entity.

It could be a performance hit, as far as I understand, that's why
Mozilla folks don't want to do full validation at run time.

> As far as I understand XHTML 2.0 isn't intended for small devices anyway, that's why XHTML Basic was simply named XHTML Basic, not "XHTML Basic 1.0" (forgive me, it's in quotes, it's in quotes!! ;-)
> At least that's what one of the editors explained to me.

We do consider if XHTML 2 is small enough that can be supported by
small devices, and XForms would be the main focus on that front.
As you quoted, we don't want a new version of XHTML Basic in the near
future.

> After validity error detection the user agent should withdraw rendering and display an error message instead.

Existing XHTML UAs do so when they detect a well-formedness error, but
don't stop rendering if it's well-formed but not valid.

> And hey, we don't need character entities anymore since even vi improved is Unicode / UTF-8 capable and has no problems with chinese characters or even rtl writing ;-)

If that's the case for most people, I'm relieved.  Personally I'd like
to remove mandatory support for the fixed set of character entities in
XHTML 2.

> Is the id declaration problem really new to XHTML 2.0? I'm tempted to believe that's inherited from XHTML 1.1 and that it's also a problem if an XML/XLink wants to refer to an XHTML 1.1 problem, or that it's a generic XLink / XPointer / Id problem, not a XHTML specific one.

That's indeed a generic XML problem we are struggling with for a long
time.  Since the major goal of XHTML 2 is to make it as XML-generic as
possible, we have to face with it.

> >   <?xml version="1.0" encoding="UTF-8"?>
> >   <?xml-stylesheet type="text/css" href="xhtml2.css"?>
> >   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "xhtml2.dtd"[
> >   <!ATTLIST html
> >       xmlns:xsi CDATA #FIXED "http://www.w3.org/2001/XMLSchema-instance"
> >       xsi:schemaLocation CDATA #IMPLIED
> >
> >   <!-- loooong list of redundant ATTLIST declarations for ID
> >        ...
> >   -->
> >   ]>
> >   <html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en"
> >         xmlns:ev="http://www.w3.org/2001/xml-events"
> >         xmlns:xfm="http://www.w3.org/2002/01/xforms"
> >         xmlns:xlink="http://www.w3.org/1999/xlink"
> >         xmlns:svg="http://www.w3.org/2000/svg"
> >         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >         xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2 xhtml2.xsd
> > ..."> ...
> >   </html>
> 
> I wouldn't mind.

Good to know.

> I'm not deep enough into Schema so I can't tell if Schema would reduce the namespace declarations.

As I said, XML Schema won't help you to reduce the namespace declarations
at all, rather it will require you to always spell them out.

> But anyway, there's copy/paste and there's good editors.

It's very dangerous to simply copy and paste them without understanding
what those are dealing with.  Namespace prefixes are variables, if you
copy some portion of XLinks from other document, it might be using
a different prefix and you'd have to redeclare it or change prefixes,
and if you redeclare it with a different prefix, unfortunately your
document cannot be DTD-valid anymore.  I still have concern if
ordinary people can manage this level of complexity.

BTW, if simple validation is just enough, I have an experimental
RELAX NG schema for XHTML2 at:

    http://www.w3.org/People/mimasa/test/schemas/rng/xhtml2.rng

This is just my personal experiment and not at all an official
work, but it's much simpler than DTD and yet it can manage namespaces
a lot better.  Like XML Schema, it won't help you to reduce
the namespace declarations, though.

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Monday, 12 August 2002 01:05:54 UTC