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

RE: Errors in Kendall Clark's xml.com article on QNames


uri vs qnames
> From: amyzing@t... [mailto:amyzing@t...]

<snip/>

> This is primarily a problem because it crosses 
> boundaries; the
> application normally doesn't expect to have to maintain a stack for
> namespaces--the parser does that.  When attributes or elements contain
> structural (even, arguably, lexical) constructs, then the application
> needs access to the internal state of the parser.  I think this is not
> good.

I don't get this argument. It seems this could just as easily be used not
simply against QNames in content, but against xml:base, xml:lang, and
xml:space, to name a few other constructs. I think doing any meaningful
processing of content will almost always require some awareness of context.
You need to know what element or attribute you are in, which means you need
access to the "internal state of the parser". The only different with
namespaces in content is that current APIs do not provide access to the
necessary state information, so applications are forced to maintain it
themselves. This is a weakness of the APIs, not an indictment of the use of
QNames. You don't reformulate XML specs to adhere to flawed APIs; you fix
the APIs.

Quite apart from that, just as there is no generic way to "tell whether
QNames are used in values", there is also no generic way to know if an
application needs to know the xml:base, xml:lang, or xml:space that is in
scope to interpret a value, so I don't see how QNames are fundamentally
different in this regard. For instance, xml:base is only going to be
relevant in interpreting URI references. So what generic mechanism is there
for recognizing that an attribute value or element content is intended to be
a URI reference so that an application knows whether it must retain
information for xml:base attributes to know what base URI is in scope?


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.