XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] namespaces redux (was: Re: [xml-dev] [XML Schema]Here's how to empower instance document authors to create their own rootelement)

Hello Andrew,

> 3. Avoid using URLs, the globally unique benefit 
> is far outweighed by the confusion cost

Are you recommending that URNs be used rather than URLs?

If yes, doesn't that eliminate the ability to use things such as RDDL?

XML Schema uses URLs for namespaces, as does XSLT. Do you believe that to be a mistake?

What do you mean by "the confusion cost"?

/Roger

-----Original Message-----
From: Andrew Welch [mailto:andrew.j.welch@gmail.com] 
Sent: Tuesday, October 16, 2012 4:35 AM
To: Amelia A Lewis
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] namespaces redux (was: Re: [xml-dev] [XML Schema] Here's how to empower instance document authors to create their own root element)

>> On 10/15/2012 12:09 AM, Liam R E Quin wrote:
>> (in fact, best practices uses of W3C namespaces are not, ultimately, so
> bad).

Here are some namespace best practices for someone about create their
own markup:

1. Always use a prefix, never change the default namespace.
2. Choose a namespace that will never, ever change - eg don't include
version numbers or dates
3. Avoid using URLs, the globally unique benefit is far outweighed by
the confusion cost
4. Keep it short, XPath 3.0 can include the namespace directly in the xpath
5. Use the standard prefixes for existing namespaces
6. Always declare all the namespaces on the root element

The goal is to help consumers of the xml avoid all the usual pitfalls
around namespaces.  Some potentially controversial ones in there...
:)



-- 
Andrew Welch
http://andrewjwelch.com

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS