Re: xlink

Thomas DeWeese wrote:


> I think if the document says to use the official SVG 
> DTD an SVG
> useragent is obliged to define the default namespace to SVG and the 
> xlink prefix to
> Xlink, even if it doesn't read the DTD,


But what if the SVG document gets read by a general non-validating XML 
parser which is not part of an SVG player? At least then you can not 
expect it to know what your prefix stands for.

The whole reliance on DTD as one specific schema language brings various 
problems, especially since the SVG DTD uses features which effectively 
(try to) change the document, and also since namespaces don't go well 
with DTD (with any post-namespace schema language you're free to choose 
the prefix etc).

> this is what the official DTD 
> says the info set
> should be (In fact all the 'real' XML parsers I am aware of _do_ read 
> the DTD, even when not doing validation,


Non-validating parsers that read the external online DTD subset? 
Offline, without catalogs?

> but I don't know the XML specs 
> well enough to know if this is required
> or not).


http://www.w3.org/TR/2002/CR-xml-names11-20021218/#ns-decl
"[Definition: A namespace (or more precisely, a namespace binding) is 
declared using a family of reserved attributes. Such an attribute's name 
must either be xmlns or begin xmlns:. These attributes, like any other 
XML attributes, may be provided directly or by default. ]"

http://www.w3.org/TR/2000/REC-xml-20001006#dt-default

"[Definition: If the declaration is neither #REQUIRED nor #IMPLIED, then 
the AttValue value contains the declared default value; the #FIXED 
keyword states that the attribute must always have the default value. If 
a default value is declared, when an XML processor encounters an omitted 
attribute, it is to behave as though the attribute were present with the 
declared default value.]"

http://www.w3.org/TR/2000/REC-xml-20001006#proc-types
"Non-validating processors are required to check only the document 
entity, including the entire internal DTD subset, for well-formedness."

So AFAICS, those who say that you can't rely on attribute values being 
supplied by the external DTD are correct.

If you are sure that your SVG player uses a validating XML parser (eg 
has the DTD and reads/knows it), then you can rely on the values being 
supplied by the DTD. But if you want to be safe, you definitely should 
declare all namespaces in the document (or at least in the internal DTD 
subset).


Tobi

-- 
http://www.pinkjuice.com/

Received on Friday, 27 June 2003 09:27:59 UTC