[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 xml
Hi,

Actually it is simpler to put namespaces everywhere... You don't have to use
them but this a good practice especially since with XML different documents
could be combined by a third party or a partner and you cannot know what
you'll have.

You should see it as a maintenence/evolution things.

At my past job, I created namespace for each document and then I used an
XSLT to delete them before processing (I was using Cocoon so I was using
pipelining). This proved to be a small overhead of treatment but useful in
several cases.

One last thing: you don't have to do <myNS:myTag>... you could instead
declare it anonymously this would work just as well and be (or so I think)
could enough.

Nicolas

___________________
Nicolas Toper
Marketing Services Technical Manager
Buongiorno France,
a Buongiorno Vitaminic Company




-----Message d'origine-----
De : kynn@p... [mailto:kynn@p...]
Envoyé : mercredi 21 avril 2004 14:52
À : xml-dev@l...
Objet :  When to design an attribute in a namespace?





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>





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.