- From: Henri Sivonen <hsivonen@iki.fi>
- Date: Wed, 9 Jan 2008 14:09:45 +0200
- To: olivier Thereaux <ot@w3.org>
- Cc: Tools dev list <public-qa-dev@w3.org>
On Jan 3, 2008, at 03:29, olivier Thereaux wrote: > On Dec 7, 2007, at 20:42 , Henri Sivonen wrote: >>> I wonder if it would be possible to preparse documents with SVG >>> media type and look for version and baseprofile attributes on the >>> root element, switching between SVG tiny, basic and full based on >>> that. >> >> I'm not sure if NVDL could already do that. > > No, I don't think so either, since nvdl has its rules and triggers > based on namespaces, as far as I can tell. This would mean that > using a different schema for different versions or profiles of a > language using one namespace (as SVG, or indeed xhtml, do) would > need a pre-parse. In the case of SVG it's not that bad since the > version/baseProfile information is on the root element, but it does > need an xml-preparsing. Having it on the root element does not require preparsing. In Validator.nu, the sniffer that inspects the root namespace does not cause the parser to backtrack. Inspecting attributes on the root element doesn't require backtracking, either. I think preparsing should be strictly avoided. [...] >> Ideally, I'd like to see a single unified SVG spec whose latest >> version the validator would track. That is, I'd prefer an "SVG5" >> schema over profiles. > > I suppose there was a good reason to create profiles for small > devices... Anyway, that would be developer feedback for the SVG > working group to hear. Given what has happened on the XHTML side with profiles, I am a bit doubtful about the goodness of reasons. The software on my actual small devices is proof by implementation that (X)HTML profiling was unnecessary. >>> I've heard a lot of arguments in favor of dropping anything in >>> namespaces not known by the validator, and/or using nvdl to >>> validate foreign namespace fragments. Is that something >>> validator.nu can do, is it planned? I'm certain this would be a >>> fantastic tool for the adoption of SVG. >> >> It might be that the NVDL part of oNVDL allows something like this >> already. I haven't investigated yet. I have considered this issue, >> though, and I am planning on punching a hole in the XHTML5 schema >> for embedded RDF, for example. > > I think that's be a perfect job for nvdl. See this example in the > jnvdl documentation: > http://jnvdl.sourceforge.net/tutorial.html#d4e311 I was able to do what I wanted in RELAX NG Compact Syntax with a comparable amount of code. I also punched anything-goes holes for OpenMath in MathML annotation- xml and for Inkscape stuff in SVG when used in a compound document. >> I guess the SVG schema should get that hole, too. I have also >> considered an option to filter out unknown namespaces, but I'm not >> sure if it is good to open such "anything goes" holes in a validator. > > Not a big fan of it myself, but there is an audience for it. I've > heard it asked more than a few times now: a number of hackers want > the right to play with the X in XML *and* get validation. It seems > to be the very reason why nrl, and nvdl, were developed. It's different to silently allow anything and to make it easy to allow a particular extension. See also http://intertwingly.net/blog/2007/11/16/Whitelisting I'm planning on allowing users to filter out namespaces of their choice without having to write an NVDL schema. However, it seems that there's more demand for syncing the HTML5 schema with the December content model change, so I'm prioritizing that. -- Henri Sivonen hsivonen@iki.fi http://hsivonen.iki.fi/
Received on Wednesday, 9 January 2008 12:10:10 UTC