Lists Home |
Date Index |
- From: John Cowan <firstname.lastname@example.org>
- To: XML Dev <email@example.com>
- Date: Tue, 11 Aug 1998 17:00:04 -0400
Tim Bray wrote:
> >until an element name is resolved, it is not possible to determine which (or
> >even whether a) element declaration applies unless the prefixes are awarded
> >global status. which method namespaces are intended to avoid.
> What do you mean by "resolve"? What do you mean by "a) element declaration
> applies"? The attribute-based declarations apply to the element on which
> they're attached and to others within that scope unless overridden. If
> the draft doesn't make that clear it's a bug. Please suggest wording
> which would make it more clear.
Here's my take on it. Suppose you have the fragment:
<foo:a>This is <b>mixed</b>content</foo:a>
where "foo" is not a previously declared prefix. One must then consult
the DTD to see whether the element declaration for "foo:a" contains
a default (or fixed) value for the "xmlns:foo" attribute. If not,
a namespace constraint has been violated.
Without prefix mapping in
the DTD, there is a possibility that the wrong "foo:a" will be fetched.
Or more accurately, there can be only one set of "foo:a" ATTLIST declarations,
and they had better be correct. This is the only way to determine
the URI corresponding to both the "a" and "b" elements.
In short: DTDs don't just serve validation, they serve attribute
normalization as well, and only after attributes are normalized
can the full set of namespace declarations be determined.
> >the containing element (or the document entity) could (assuming the encoding
> >is supported) just as well provide the binding. this would avoid the ambiguity.
> What do you mean by "encoding"? What do you mean, in this context, by
> "binding"? What ambiguity are you talking about?
Paraphrase: "The declaration of a namespace could be placed in the
parent element, such that the prefix-to-URI mapping affects only
its children, and not itself."
> >what is the argument for having an element qualify its own identifier?
> What do you mean by "qualify"? What do you mean by "identifier"?
Paraphrase: "What (rhetorical) argument is used to
defend the position that the attributes of an element should provide
the URI for its own GI?"
Note on my own account: The draft implies that non-validating parsers
may differ from each other, and from validating parsers, on which
namespaces the elements and attributes in an instance may belong to, and
whether they belong to any at all, depending on whether the parser reads
the DTD in full, partially, or not at all. Non-validating parsers
cannot assume that because they do not know the definition of a
prefix, that it is an error to use it.
<strong>All these considerations fall to the ground if namespace attributes
*cannot* be defaulted from the DTD (unlike other XML attributes).
The draft is silent on the point.</strong>
John Cowan http://www.ccil.org/~cowan firstname.lastname@example.org
You tollerday donsk? N. You tolkatiff scowegian? Nn.
You spigotty anglease? Nnn. You phonio saxo? Nnnn.
Clear all so! 'Tis a Jute.... (Finnegans Wake 16.5)
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)