K
kj
In an earlier thread, JKrugman posted the following quote:
This quote suggests that, when designing a schema/DTD one can safely
let most (if not all) attributes have no namespace (i.e. be
"unprefixed"); during this design phase, only rarely need one
specify an attribute as belonging to a namespace (i.e. requiring
a prefix).
But I am interested in learning to recognize those rare situations
in which, as a designer, one *should* put a particular attribute
in a namespace. This is still very unclear to me. What are the
requirements that an attribute must fulfill to be a good candidate
for being placed in a namespace?
Thanks!
kj
...the purpose of XML namespaces is to uniquely identify element
and attribute names. Unprefixed attribute names can be uniquely
identified based on the element type to which they belong, so
there is no need identify them further by including them in an
XML namespace. In fact, the only reason for allowing attribute
names to be prefixed is so that attributes defined in one XML
language can be used in another XML language.
This quote suggests that, when designing a schema/DTD one can safely
let most (if not all) attributes have no namespace (i.e. be
"unprefixed"); during this design phase, only rarely need one
specify an attribute as belonging to a namespace (i.e. requiring
a prefix).
But I am interested in learning to recognize those rare situations
in which, as a designer, one *should* put a particular attribute
in a namespace. This is still very unclear to me. What are the
requirements that an attribute must fulfill to be a good candidate
for being placed in a namespace?
Thanks!
kj