- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 1 Nov 2004 17:05:31 -0800
- To: www-svg@w3.org
- Message-ID: <20041102010531.GA4575@darby.dbaron.org>
The media type registration [1] for image/svg+xml should be changed so that a conformant image/svg+xml processor must not treat XML elements that are in no namespace as though they were in the SVG namespace. Omission of namespaces seems to be a common authoring mistake in SVG on the Web, for example [2], which suggests that this is a common mistake in existing SVG implementations. Such documents are not conformant SVG documents because of: * the "an SVG namespace declaration must be provided" requirement in [3], and * because of the validity test in [5] (which would attempt to validate a document with no root element, since no elements are in the SVG namespace). The SVG 1.1 specification does not define error handling for such documents. This is perfectly reasonable, since describing the behavior of elements outside of the SVG namespace is out of scope of the SVG specification. However, now that the SVG specification contains a media type registration, that media type registration should define how to handle documents that would not otherwise be considered SVG when sent using the registered media type. I don't have strong opinions on *how* the registration should forbid treating the no-namespace elements as SVG. One reasonable way would be stating that a conformant image/svg+xml processor must abort processing of any document sent as image/svg+xml unless the root element of that document is in the "http://www.w3.org/2000/svg" namespace. I believe this requirement would be sufficient to bootstrap the error-handling requirements for unknown elements ([6] and [7]). -David [1] http://www.w3.org/TR/2004/WD-SVG12-20041027/mimereg.html [2] http://www.w3.org/Consortium/Offices/Presentations/svgs/World.svg and the external resources it references: http://www.w3.org/Consortium/Offices/Presentations/svgs/WorldAS.svgz http://www.w3.org/Consortium/Offices/Presentations/svgs/WorldEU.svgz http://www.w3.org/Consortium/Offices/Presentations/svgs/WorldUS.svgz These four files currently use SVG elements with no namespace prefixes but have no xmlns attribute making the SVG namespace the default on the root element and have no DOCTYPE declaration that would introduce such an attribute. [3] http://www.w3.org/TR/2003/REC-SVG11-20030114/struct.html#NewDocumentOverview (Although, for documents that have a DOCTYPE declaration, such as [4], it is unclear whether this requirement means that the xmlns declaration must also be explicitly provided.) [4] http://www.w3.org/2002/05/memberGraph.svgz [5] http://www.w3.org/TR/2003/REC-SVG11-20030114/conform.html#ConformingSVGDocuments [6] http://www.w3.org/TR/2003/REC-SVG11-20030114/extend.html#PrivateData [7] http://www.w3.org/TR/2003/REC-SVG11-20030114/implnote.html#ErrorProcessing -- L. David Baron <URL: http://dbaron.org/ >
Received on Tuesday, 2 November 2004 01:06:05 UTC