RE: An invalid example in SVG 1.0 Spec. - Chapter 17.1

Satoshi Ishikawa has missed a crucial point in XML. Namespace
declarations may look like attributes -- they use an attribute-like
syntax -- but they are explicitly not attributes, they are namespace
declarations. Namespaces and attributes are distinct in the Infoset and
are represented by distinct axes in XPath.

Document Type Definitions (DTDs) predate XML namespaces, and as a result
DTDs don't know anything about namespaces. While XML Schemas (XSDs) are
namespace aware, the SVG 1.0 specification was developed before XSD was
a recommended specification, so SVG 1.0 is defined in terms of the
(archaic) DTD mechanism.

Furthermore, the XML 1.0 specification reserves all names beginning with
"xml" (in any combination of upper and lower case) [1], therefore xmlns
would never be a valid attribute.

XML namespaces are defined in [2], which states that a namespace
declaration may appear in any start tag or empty tag. This means it is
meaningless to specify which namespace declarations can or must be
defined in a given element.

The bottom line is that the example is valid XML 1.0 (with Namespaces)
according to the SVG's DTD. No DTD can ever specify xmlns:link as the
name of an attribute (a name cannot begin with "xml" and cannot contain
a colon).

Cheers,
Stuart Celarier
www.ferncrk.com, stuart@ferncrk.com

References:
[1] http://www.w3.org/TR/REC-xml#sec-documents, see definition of Name.
[2] http://www.w3.org/TR/REC-xml-names/




-----Original Message-----
From: www-svg-request@w3.org [mailto:www-svg-request@w3.org] On Behalf
Of Dean Jackson
Sent: Sunday, February 24, 2002 08:11
To: Satoshi ISHIKAWA
Cc: www-svg@w3.org
Subject: Re: An invalid example in SVG 1.0 Spec. - Chapter 17.1

Satoshi ISHIKAWA wrote:
> Tobias Reif wrote:
> 
> 
>>But ist is valid. Complete valid document:
>>
>><?xml version="1.0" encoding="UTF-8" standalone="no"?>
>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
>>   "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
>><svg width="5cm" height="3cm" viewBox="0 0 5 3"
>>xmlns="http://www.w3.org/2000/svg"
>>xmlns:xlink="http://www.w3.org/1999/xlink"/>
>>
> 
> Sorry, I cannot understand why it is valid.
> In 'svg10.dtd' [1], attributes for 'svg' element are
> declared as follows:
> 
> <!ATTLIST svg
>     xmlns CDATA #FIXED "http://www.w3.org/2000/svg"
>     %stdAttrs; 
>     %testAttrs; 
>     %langSpaceAttrs;
>     externalResourcesRequired %Boolean; #IMPLIED
>     class %ClassList; #IMPLIED
>     style %StyleSheet; #IMPLIED
>     %PresentationAttributes-All;
>     viewBox %ViewBoxSpec; #IMPLIED
>     preserveAspectRatio %PreserveAspectRatioSpec; "xMidYMid meet"
>     zoomAndPan (disable | magnify) "magnify"
>     %graphicsElementEvents;
>     %documentEvents;
>     version %Number; #FIXED "1.0"
>     x %Coordinate; #IMPLIED
>     y %Coordinate; #IMPLIED
>     width %Length; #IMPLIED
>     height %Length; #IMPLIED
>     contentScriptType %ContentType; "text/ecmascript"
>     contentStyleType %ContentType; "text/css"
> 
> 
> Attribute 'xmlns:link' does not appear.
> 

Satoshi is correct. We've known about this for a while and
an errata is about to be published.

Dean

Received on Wednesday, 13 March 2002 13:26:40 UTC