OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] When to design an attribute in a namespace?

[ Lists Home | Date Index | Thread Index ]

Speaking for XML Schema: I believe this comes down to whether or not you
would like the attribute to be considered as part of the "vocabulary"
that the schema defines. That is a conceptual criterion - but a more
concrete criterion would be whether or not you want to ensure that, when
the schema is imported into another schema, there is no "collision" due
to the importing schema having a no-namespace attribute of the same
name.

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton
Strategy and Technology Consultants to the World


kynn@panix.com wrote:
> 
> In http://www.rpbourret.com/xml/NamespacesFAQ.htm#q5_3, it says:
> 
>   ...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"); the designer only rarely should need to 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 by the schema/DTD designer?
> Thanks!
> 
> kj
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>

-- 
Kind Regards,
Joseph Chiusano
Associate
Booz | Allen | Hamilton




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS