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

Re: My report on experiments with unused namespaces

  • From: Stephen Green <stephengreenubl@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Wed, 22 Sep 2010 10:38:04 +0100

Re:  My report on experiments with unused namespaces
Isn't this actually a war on the lexical use of XML? Isn't it still important to
support the use cases where people treat XML as text? If the 'unused
namespaces' can be eliminated when XML is processed by namespace-
aware applications then the only way to preserve the information they
might contain is by handling the XML lexically as text, which it seems to
me could be what is under attack here.

Best regards

Steve
---
Stephen D Green




On 22 September 2010 09:58, Costello, Roger L. <costello@mitre.org> wrote:
> Amelia Lewis wrote:
>
>> Given these potentially significant characterizations, what's the goal
>> of categorizing namespace declarations as "in use" or "not in use"?
>
> Simon noted in his message:
>
>    ... namespace declarations as kind of a
>    backchannel for propagating information
>
> In my first message I showed that unused namespaces can contain large amounts of information which is unchecked by XML applications (e.g., XML Schema validation ignores unused namespaces).
>
> This is a significant concern for me and others.
>
> Eliminating unused namespaces reduces concern.
>
> Goal: identify and eliminate unused namespaces.
>
> /Roger
>
> -----Original Message-----
> From: Amelia A Lewis [mailto:amyzing@talsever.com]
> Sent: Tuesday, September 21, 2010 5:34 PM
> To: Costello, Roger L.
> Cc: xml-dev@lists.xml.org
> Subject: RE:  My report on experiments with unused namespaces
>
> On Tue, 21 Sep 2010 16:25:46 -0400, Costello, Roger L. wrote:
>> I wish to verify that I correctly understand Amelia's post.
>
> Errrrrrr.
>
>> ---------------------------------------------------------
>> <Root xmlns:soap="http://www.w3.org/2001/09/soap-envelope">
>>
>>     <faultcode>soap:Client</faultcode>
>>
>> </Root>
>> ---------------------------------------------------------
>>
>> Notice the value of <faultcode> is a QName.
>>
>> If the application that receives the XML document is _not_ "SOAP
>> aware" then the application _may_ treat soap:Client as simply data,
>> not as a QName. That application _may_ consider this to be an unused
>> namespace:
>>
>>     http://www.w3.org/2001/09/soap-envelope
>>
>> If the application that receives the XML document _is_ "SOAP aware"
>> then the application _must_ process soap:Client as a QName. Thus,
>
> If that's an RFC 2119 "MUST", then a random "soap-aware" application
> (whatever that may be) MUST follow the specification for SOAP-aware
> applications.
>
> Since this isn't a SOAP message, I have no idea where your "MUST" comes
> from.
>
>> that application _must_ consider this to be a used namespace:
>>
>>     http://www.w3.org/2001/09/soap-envelope
>>
>> Is this correct?
>
> To the best of my knowledge and belief, there is no specification or
> schema governing the message supplied above, so processors are free to
> do whatever they would like to do with it.
>
>> <soap:Envelope xmlns:soap="http://www.w3.org/2001/09/soap-envelope">
>>
>>     ...
>>
>> <soap:Envelope>
>
> Ah, now, we have a specification that discusses the contents of SOAP
> messages.
>
>> Notice that the element name is a QName.
>>
>> According to the XML REC, element names may contain colons. Thus,
>> soap:Envelope could simply be the name of the element. However, the
>> REC also says this:
>>
>>     Note:
>>
>>     The Namespaces in XML Recommendation [XML Names]
>>     assigns a meaning to names containing colon characters.
>>     Therefore, authors should not use the colon in XML names
>>     except for namespace purposes, but XML processors must
>>     accept the colon as a name character.
>>
>> I conclude from that note that all XML-aware applications which
>> receive the above XML document _must_ treat soap:Envelope as a QName.
>
> Good heavens.  How silly.  All of those pre-namespace XML
> implementations are thus condemned as not-XML, just because they
> predate the concept of QName?
>
>> Therefore all applications (SOAP-aware applications and SOAP-unaware
>> applications) _must_ consider this namespace as being used:
>>
>>     http://www.w3.org/2001/09/soap-envelope
>
> What does:
>
> "this namespace is in use"
>
> and
>
> "this namespace is not in use"
>
> mean?
>
> There are several different ways to answer each of those questions
> (although answering one "true" should *generally* mean that the other
> is answered "false").  Is "in use" defined by the Namespaces in XML
> specification?
>
> Before the concept can be useful, it must be meaningful.  On the other
> hand, because there are dragons here, it behooves one to have a use in
> mind before taking the time to map this territory.  Why does it
> *matter* whether you label a namespace "in use" or "not in use"?  What
> are you trying to achieve?
>
> The Namespaces in XML specification *does* define what it means to
> declare a namespace to prefix mapping.  It is easy to say "this
> namespace is mapped to this prefix in this element scope."  It is at
> least possible to say "if this namespace declaration were removed (and
> no other change were made), this document would no longer be
> well-formed."  That seems to correspond to your "in use as part of
> element name" scenario (and also corresponds to the similar, though not
> identical, "in use as part of attribute name" scenario--there's an
> interesting distinction there, since it's guaranteed that xmlns="" can
> only affect element well-formedness, whereas xmlns:[x]="" can affect
> attributes as well).
>
> Now, for the case where a QName is used in element or attribute
> content, but not as part of element or attribute names, suppression of
> the controlling namespace declaration can produce invalid XML, but not
> ill-formed XML.  That's an important distinction, because validation
> errors are not required to be fatal.  Make a document ill-formed
> (including the special case "namespace-ill-formed"), and the parser is
> *required* to produce a fatal error and *stop parsing*.  Now, there's
> an interesting parallel to the above distinction between namespace
> declarations that can only affect elements, and never attributes: those
> declarations (declarations of the mapping to the default/nil prefix)
> can never be used in element and attribute content, either (well ... in
> fact, they could, potentially, but no specification that uses QNames in
> content permits that, so far as I am aware).
>
> Given these potentially significant characterizations, what's the goal
> of categorizing namespace declarations as "in use" or "not in use"?
>
> Amy!
> --
> Amelia A. Lewis                    amyzing {at} talsever.com
> Being your slave, what should I do but tend
> upon the hours and times of your desire?
> I have no precious time at all to spend,
> nor services to do, till you require.
>
>
>
> _______________________________________________________________________
>
> 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.