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] a namespace definitions related question(s)

Shlomo Yona writes:

If the XML processor that processes the XML document that I gave as 
example is also validating and is namespace aware what is the correct 

The correct answer, in my opinion, is that your document is "not well 
formed".   In particular, your processor might want to point out that your 
document fails to satisfy  "Well-formedness constraint: Element Type 
Match". [1] 

Regarding namespace awareness:  according to the XML Namespaces 1.1 
Recommendation [2]:   "To conform to this specification, a document MUST 
be well-formed according to the XML 1.1 specification [XML 1.1]."  We've 
just discovered that your document is not well formed per the XML 
Recommendations (XML 1.0 or XML 1.1 actually), so the Namespaces 
Recommendation does not apply to it.  You can't (or shouldn't anyway) 
report errors a against a specification that does not apply.

Presuming that by "validating" you mean a processor that conforms to the 
W3C XML Schema 1.0 Recommendation, then [3] what gets assessed is what the 
Infoset Recommendation calls an Element Information Item [4].  While there 
are, for oddball purposes, quite a wide variety of ways you can conjure up 
an element information item, your case is the obvious one, in which you 
have in hand what purports to be an XML document.  The Infoset 
Recommendation says of this case: "An XML document has an information set 
if it is well-formed and satisfies the namespace constraints described 
below. There is no requirement for an XML document to be valid in order to 
have an information set."  Since, as we showed at the beginning, your 
document is in fact not well formed, there is no obvious mapping from it 
to an Infoset.  Since an Infoset (specifically an Element Information 
Item) is a precondition for assessing schema validity, the W3C XML Schema 
Recommendation does not apply to your case either.

Suggestion:  while the XML Schema Recommendation is (unfortunately) a bit 
complex, the XML and Namespaces Recommendations are reasonably 
straightforward.  If you have this level of concern about who this all 
works, I suggest you take the time to read the pertinent parts of those 
specifications.  In fact, if you're interested in the schema side of 
things, link [3] jumps you pretty much to the pertinent part of the 
Recommendation.  I hope this makes clear that the pertinent specifications 
answer your question quite clearly and reasonably unambiguously: your 
document is not well formed and in that sense is not XML.  For all 
practical purposes, the Namespaces and Schema Recommendations therefore do 
not apply at all.  I hope this helps.


[1] http://www.w3.org/TR/REC-xml/#sec-logical-struct
[2] http://www.w3.org/TR/xml-names11/#Conformance
[3] http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/#validation_outcome
[4] http://www.w3.org/TR/xml-infoset/#infoitem.element
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

"Shlomo Yona" <S.Yona@F5.com>
02/20/2007 10:49 AM
        To:     "Michael Kay" <mike@saxonica.com>, "Anne Thomas Manes" 
        cc:     <xml-dev@lists.xml.org>, (bcc: Noah 
        Subject:        RE: [xml-dev] a namespace definitions related 


If the XML processor that processes the XML document that I gave as 
example is also validating and is namespace aware what is the correct 



-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com] 
Sent: ג 20 פברואר 2007 14:20
To: 'Michael Kay'; Shlomo Yona; 'Anne Thomas Manes'
Cc: xml-dev@lists.xml.org
Subject: RE: [xml-dev] a namespace definitions related question(s)

> > In the XML instance that I posted:
> > * is the document well formed?

I responded:
> Yes.

I didn't read it carefully enough, the correct answer is no.

Michael Kay


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]

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