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

Re: Lesson Learned: Use namespaces for both markup anddata

  • From: Evan Lenz <evan@evanlenz.net>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Tue, 11 Aug 2009 11:09:37 -0700

Re:  Lesson Learned: Use namespaces for both markup anddata
I think that hits the nail on the head. Use QNames in content (or 
attribute values) only if you're referring to objects already identified 
by QNames. This is most appropriate for XML that describes some other 
XML, e.g., <xsd:element> or <xsl:element> or XPath expressions. In each 
case, yes, QNames are used in content, but they're referring to (or 
declaring, or constructing) *elements*.

Things get nasty when people start using QNames for everything under the 
sun, not just elements and attributes and references to them. This 
practice was blessed with XSLT's use of QNames for auxiliary objects 
(mode names, variable names, etc.), and then W3C XML Schemas joined the 
party, using QNames to name data types, groups, attribute groups, etc.

This in turn puts the burden on other people to use QNames when 
referring to such objects. Someone has to come in and say, "Enough!" No 
more QNames for new kinds of things. Let's grandfather in what's already 
identified by QNames, and if you need to refer to them, use QNames, but 
please don't use QNames for modeling your own data.

Evan

Michael Kay wrote:
>
> If the objects you are referencing are identified by QNames (as XSD 
> types are), then you should certainly use QNames when referring to them.
>  
> But that doesn't mean all objects should be identified by QNames.
>  



[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.