[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: When to design an attribute in a namespace?


namespace qualify xml attributes

On Apr 21, 2004, at 8:51 AM, <kynn@p...> wrote:
>
>
> 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?
>
Generally if the use of the attribute is always taken in context of its 
parent element then the attribute need not be namespace qualified. On 
the other hand, if attributes are intended to have meaning regardless 
of which element it is attached to, the attribute ought be namespace 
qualified.

For example, XLink attributes can be defined on potentially any element 
-- these are namespace qualified, and define a link regardless of the 
name of the element.

Another example is RELAXNG

<rng:element name="foo" > ...

In this case there is no need to namespace qualify the "name" attribute 
as its meaning is determined by the rng:element.

That's how I see it.

Jonathan


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.