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

RE: a namespace definitions related question(s)

  • From: noah_mendelsohn@u...
  • To: "Shlomo Yona" <S.Yona@F...>
  • Date: Tue, 20 Feb 2007 11:18:55 -0500

RE:  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 
answer?

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.

Noah

[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
1-617-693-4036
--------------------------------------








"Shlomo Yona" <S.Yona@F...>
02/20/2007 10:49 AM
 
        To:     "Michael Kay" <mike@s...>, "Anne Thomas Manes" 
<atmanes@g...>
        cc:     <xml-dev@l...>, (bcc: Noah 
Mendelsohn/Cambridge/IBM)
        Subject:        RE:  a namespace definitions related 
question(s)


Hello,

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 
answer?

Thanks.

Shlomo.

-----Original Message-----
From: Michael Kay [mailto:mike@s...] 
Sent: â 20 ôáøåàø 2007 14:20
To: 'Michael Kay'; Shlomo Yona; 'Anne Thomas Manes'
Cc: xml-dev@l...
Subject: RE:  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
http://www.saxonica.com/


_______________________________________________________________________

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@l...
subscribe: xml-dev-subscribe@l...
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.