Re: 'XHTML + RDFa 1.0' validation?

Olivier Thereaux:
>
> I think the SVG WG abandoned the idea that a DTD could be useful for
> SVG a while ago, mostly because of how SVG can tend to be embedded in
> other XML languages, and vice-versa. RNG, for instance, seem to be
> more flexible in this regard than DTDs.
>
> ... not that I can claim to speak on the behalf of the SVG WG,
> obviously. Anyone from the WG reading the list?

I was for about a year a member of the SVG group as invited expert.
But I'm surely no expert for DTDs or RNGs.
My impression was, that there is for example a problem to express
something like
"The 'switch' element may contain any element that its parent may contain."
( http://www.w3.org/TR/SVGMobile12/elementTable.html )
in some of these meta languages, but of course I can be wrong with
this impression. Due to the introduction of the more generous handling of
missing attributes (lacuna values), there may occur some problem too,
even for some attributes there are no default or lacuna value
(I think, this happens for SMIL animation).
Or the syntax of some attribute values is very important and 
I think the validator does not check this too, for example
the grammar for path data:
http://www.w3.org/TR/SVGMobile12/paths.html#PathDataBNF
Or the notation of simple lists seems to be already a problem for 
some generators, as it turned out in previous discussions about
the values attribute:
http://www.w3.org/TR/SVGMobile12/animate.html#ValuesAttribute
http://lists.w3.org/Archives/Public/www-svg/2008Oct/0005.html

Personally I think, it is very helpful to have a check for whatever
can be checked automatically, because some nesting rules are 
very complex and authors can be thankful for any help they can 
get to do it the right way. And if one has already several valid results 
for simple documents, it is easier to combine something to a not 
really testable compound document, if required.
And if we take the 'XHTML + RDFa 1.0' example - a validator
will find out within a second, whether an element 'br' can have an
attribute 'property' or not, I got stuck after an hour looking in
this fascinating 'XHTML + RDFa 1.0' DTD myself without a result ;o)

The other problem I can see is similar to that for the current wrong
detection of 'XHTML + RDFa 1.0'. In the prose of SVG is mentioned, 
that it is allowed or expected, that some elements contain 
content from other namespaces (metadata, foreignObject or
title and desc in SVG 1.1). 
The validator has always problems with this for SVG 1.1, maybe
because it is not expressable in the DTD.
I think, the HTML5 validator from Henri Sivonen manages to
cover such situations better. He told, that this validator only 
indicates, that the content is unkown. Because the elements
with possible unknown content are known, a validator could
only check, if the XML inside is at least correct and leave it
to the author or another validator to check the unknown
language fragment instead of indication this as an error.

This would avoid uncertainties of authors about wrong error 
messages due to the limitations of the DTD as for the situation
with the detection of a 'XHTML + RDFa 1.0' document
as 'XHTML 1.0 transitional' followed by wrong error indications.
Here it is not the primary problem, that the validator cannot
check the document without the doctype at the beginning,
it is more the problem, that the validator chooses the wrong
DTD to check the document, instead of checking for example
only, whether the document is at least valid XML or not ;o)


Olaf

Received on Wednesday, 26 November 2008 11:09:14 UTC