Lists Home |
Date Index |
james anderson wrote:
> A namespace declaration should take the form of an attribute declaration.
> The scope of the namespace declaration is the respective element
> declaration, and the closure of the respective contained element and
> attribute declarations, subject to the limiting effect of contained
> attribute declarations.
While I would agree to this if we were trying to find a notation
consistent with existing DTDs, I prefer John's notation, which (as he
points) is less error prone.
> One of the likely uses for an extended DTD notation would be
> definitions which combine existing DTD-encoded definitions which
> are not namespace-aware. In order for the extended notation to
> integrate such definitions, it must be able to declare
> prefix/namesace-name bindings which have a scope which corresponds
> to the lexical scope of bindings which appear in elements.
Assuming I read your example correctly, what you want to do is take
element types x and y, which were not in any namespace, and, through a
trick of default namespaces, declare them to be in the data:,ns-a and
I find this abusive and no more correct than renaming x and y as Fred
and Ginger. They were not in any namespace, so when used in a compound
document, they should continue not to be in any namespace.
Supporting this is quite easy using the NAMESPACE notation, with the
proviso that one must be careful not to declare a default namespace.
(This is similar to using non-namespaced elements in an instance -- the
presence of a default namespace will cause these to be inadvertently