From 1728fa352011c570ce1bcc3bd14897e789c85252 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 15 Oct 2008 09:23:01 +0100 Subject: [PATCH] [svg] Add notes about why we shouldn't add DOCTYPE. Emmanuel Pacaud did some research into adding DOCTYPE after we had a complaint that our SVG output failed to be validated by batik. The conclusion he came to was that the validation of SVG was incomplete and misleading, i.e. our output might generate false negatives leading to more confusion. --- src/cairo-svg-surface.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 19af8737b..ca323dc76 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -2461,6 +2461,28 @@ _cairo_svg_document_finish (cairo_svg_document_t *document) if (document->finished) return CAIRO_STATUS_SUCCESS; + /* + * Should we add DOCTYPE? + * + * Google says no. + * + * http://tech.groups.yahoo.com/group/svg-developers/message/48562: + * There's a bunch of issues, but just to pick a few: + * - they'll give false positives. + * - they'll give false negatives. + * - they're namespace-unaware. + * - they don't wildcard. + * 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. + * + * http://jwatt.org/svg/authoring/: + * Unfortunately the SVG DTDs are a source of so many issues that the + * SVG WG has decided not to write one for the upcoming SVG 1.2 + * standard. In fact SVG WG members are even telling people not to use + * a DOCTYPE declaration in SVG 1.0 and 1.1 documents. + */ + _cairo_output_stream_printf (output, "\n" "