Re: Well formedness Validation not proper in EXPAT

Reid Spencer <[email protected]>
Newsgroups gmane.text.xml.expat.general
Organization eXtensible Systems, Inc.
Message-ID <[email protected]>
I would concur with rolf's interpretation. Note that section 2.4 of the
XML specification states:

The ampersand character (&) and the left angle bracket (<) MUST NOT
appear in their literal form, except when used as markup delimiters, or
within a comment, a processing instruction, or a CDATA section. If they
are needed elsewhere, they MUST be escaped using either numeric
character references or the strings "&amp;" and "&lt;" respectively. The
right angle bracket (>) MAY be represented using the string "&gt;", and
MUST, for compatibility, be escaped using either "&gt;" or a character
reference when it appears in the string "]]>" in content, when that
string is not marking the end of a CDATA section.

So, the < character in the character data would constitute a violation
of well-formedness. But, the same does not hold true for >. So, the
document is well formed and xerces is complaining about something it
should not complain about.

Reid.

On Wed, 2006-02-15 at 12:24 +0100, [email protected] wrote:
> On 15 Feb, [email protected] wrote:
> > There was a typo in the example. It looks something like this
> > 
> > <doc>>>>
> > 	<name1>devyani</name1>>>>
> > 	<name2>raj</name2>
> > </doc>
> > 
> > My question is how can I catch such a problem since in my knowledge
> > EXPAT does not treat it as a WELL formed ness error but XERCES does.
> 
> What I see is perfect well-formed XML.
> 
> Which well-formedness error do you see, in your example?  What error
> msg does Xerces gives you?
> 
> If Xerces in fact doesn't parse your example XML, then that is a
> Xerces bug.
> 
> rolf
> 
> 
> _______________________________________________
> Expat-discuss mailing list
> [email protected]
> http://mail.libexpat.org/mailman/listinfo/expat-discuss

_______________________________________________
Expat-discuss mailing list
[email protected]
http://mail.libexpat.org/mailman/listinfo/expat-discuss
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQBD9PPR3J9yEj6nvGcRAvKiAJ9CkbXi2ORpAzxN+gTOr2pUzlJaOgCeMaNn
2H8ZHZyNtsH2NONyEksEYKw=
=ZdBH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.