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".  Regarding namespace awareness: according to the XML Namespaces 1.1 Recommendation : "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  what gets assessed is what the Infoset Recommendation calls an Element Information Item . 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  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  http://www.w3.org/TR/REC-xml/#sec-logical-struct  http://www.w3.org/TR/xml-names11/#Conformance  http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/#validation_outcome  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!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format