[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Namespace conformance & SAX2
- From: Rob Lugt <firstname.lastname@example.org>
- To: Jonathan Borden <email@example.com>,Chris Nokleberg <firstname.lastname@example.org>, email@example.com
- Date: Sat, 19 May 2001 23:55:51 +0100
Jonathan Borden wrote:
> > Yes, perhaps my wording was unfortunate. How about if I reword my
> > explanation like so:-
> > "Syntax errors are well-formedness errors in XML 1.0 and well-formedness
> > errors are reported as fatal errors. Therefore, it follows that syntax
> > errors on the QName or NCName productions should be reported as
> > fatal errors
> > to be consistent."
> no. XML 1.0 does not define a 'syntax error' as a well-formedness error.
> http://www.w3.org/TR/REC-xml#sec-well-formed. Well-formedness constraints
> applicable to XML are defined in the XML 1.0 rec, not in any other
> These are labelled "WFC" in the spec. Similarly "Namespace Constraints"
> labelled "NSC" in the namespace spec. Do a grep and you'll see.
Oh boy this is as easy as stepping through treacle.
My words above "Syntax errors are well-formedness errors in XML 1.0" were
chosen carefully. Notice I didn't write "well-formedness constraint".
Proof for the above statement can be obtained from XML 1.0, section 4.3.2
which states: "The document entity is well-formed if it matches the
production labeled document.". So, if there are syntax errors, the document
won't match the document production and therefore will not be well-formed.
I would expect an XML processor to report this as a fatal error.
Back to the subject of the Namespaces recommendation. This spec changes the
document production somewhat, replacing the Name production with QName or
NCName. If a document fails to match one of these productions, then it does
not match the [modified] document production and (I'd like to say it isn't
well-formed but I'll resist) this should be reported as a fatal error to be
I'm not too concerned about the name given to the error. But the severity
of the error is important and should be agreed upon.