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] My report on experiments with unused namespaces

Can I assume that the following is the conclusion?

a) XML spec or Namespaces in XML Spec do not dictate whether namespace
declarations are used or unused.
b) Whether a namespace declaration is being used or not depends on the
processing application. [i.e. processing application has the
capability to, and wishes to interpret text content within markup as
qualified names, or chooses to remain ignorant of it.]
c) There are no known "practical" uses of knowing whether a namespace
declaration is being used or not.
d) Its up to the users to choose to work around schema constraints by
using namespace declarations for data exchange.
for e.g. [
<orderInfo xmlns:poid="1234" xmlns:description="sampleOrder"

How Lovely!


On Tue, Sep 21, 2010 at 2:33 PM, Amelia A Lewis <amyzing@talsever.com> wrote:
> 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

Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
 A typical Macroprocessor

[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