Re: [svg-developers] DTD declaration, was:Re: google and SVG
- Jonathan Watt wrote:
> On Wed, 30 Mar 2005 15:53:40 +0200, Robin Berjon <robin.berjon@...> wrote:It may be accessible but it's not terribly useful as an XML validator.
>>Use DTDs for validation if you want (they won't validate much but it's a
>>start) but don't use DOCTYPE. It's useless.
> The most accessible validator is the one provided at validator.w3.org
> - it doesn't allow you to specify the DTD that should be used. It may
> allow you to select a "Doctype", but SVG isn't on the list that's
> provided. It seems to me that it's still useful to include a DOCTYPE
> in this case.
This however is being worked on.
> Furthermore, for those of us who get emails saying "this page doesn'tIt'll take a little while but an SVG validator that works better much
> work in your SVG implementation" it would be useful to be able to
> throw the URL into the W3C validator to help in debugging without
> having to manually choose/type an SVG DTD URL as well.
than that is being worked on. The RNG that's in 1.2 will go a long way
> Even if DOCTYPEs don't have clear uses to you, why so stronglyThere's a bunch of issues, but just to pick a few:
> discourage their use unless they are actively harmful?
- they'll give false positives. This is true of all schema languages as
none of them can express sufficient constraints, but in the case of
DTDs they are so ridiculously under-expressive that the content
models of some elements are really, really loose compared to what the
spec requires. After DTD validation you still don't know that you
haven't done something really stupid.
- they'll give false negatives. This is quite seriously broken. If you
rely on DTDs to tell you when something is broken, you might well end
up spending hours trying to debug a document that seems perfectly
fine only to realize at the end that it's just the DTD being wrong.
This is not the fault of the authors of the SVG DTD, it is simply
impossible to author a DTD that will not give false negatives.
- they're namespace-unaware. You know better than I do that the number
one mistake is to forget the namespace. DTDs won't catch that because
they don't know about namespaces.
- they don't wildcard. It is perfectly fine in SVG to introduce
elements and attributes in other namespaces, and there even are
extension points dedicated to that. Unless you modify the DTD, this
will always give you a false negative.
So when they say OK they really haven't checked anything, when they say
NOT OK they might be on crack, and like all namespace-unaware things
they're a dead branch of the XML tree. But feel free to use them anyway :)
> Which elements insidei would consider it good practice to include title and desc , though
> svg-files are to be filled:
google seems not to search the body of the file, yet.
there are different versions of the googlebot out there which treat svg
( im not sure if there is one version that searches the body, though
there are still full text indexed sites in the index.)
considering Metadata ,
i dont know - it depends on the context in which you publish your file-.
maybe just add openclipart.org style metadata.
> Is there somebody beeing in relation with Google (Holger Will?) tosure there are people in relation with google, im not :)
> bring the wishlist of svg-designers.
but anyways, i think its a good idea to send in a wish list.(im not
> So, what about reality now?as stated before, there seem to be different versions of googlebot which
treat svg files differently.
and also google does not search the textnodes in your file. for now
google just indexes the filename.