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

Re: namespaces redux (was: Re: [XML Schema] Here's h

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: "Andrew Welch" <andrew.j.welch@gmail.com>,"Amelia A Lewis" <amyzing@t...>
  • Date: Tue, 16 Oct 2012 09:50:42 +0100

Re:  namespaces redux (was: Re:  [XML Schema] Here's h
For someone creating their own markup, unless there is some reason that they 
can't such as backwards compatibility, I would suggest doing:

<com.example.mySchema.myRoot   myAttribute="blah">
    <myElement  myQName="com.example.mySchema.name">
        blah
    </myElement>
</com.example.mySchema.myRoot>

I would have some 'blessed' domains like 'w3c' and 'ietf' so you could do:

<w3c.html></w3c.html>

etc.

But now I'm navel gazing!

Pete Cordell
Codalogic Ltd
Twitter: http://twitter.com/petecordell
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
----- Original Message ----- 
From: "Andrew Welch" <andrew.j.welch@gmail.com>
To: "Amelia A Lewis" <amyzing@talsever.com>
Cc: <xml-dev@lists.xml.org>
Sent: Tuesday, October 16, 2012 9:34 AM
Subject: Re:  namespaces redux (was: Re:  [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]


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.