Re: Well formedness Validation not proper in EXPAT

"Fisher, Paul_K (Houston)" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <E9DE7963E5EA6546B42A979EC28B4D0111EBCC14@hou-ex-02.adprod.bmc.com>
Because then the extra ">" characters are considered content after the root element of the document is closed.
 
paul

	-----Original Message----- 
	From: [email protected] on behalf of [email protected] 
	Sent: Thu 2/16/2006 10:40 PM 
	To: [email protected]; [email protected] 
	Cc: [email protected] 
	Subject: Re: [Expat-discuss] Well formedness Validation not proper in EXPAT
	
	


	Hi rolf,
	
	Thanks a lot for clarification , I verified it with both xerces and
	expat and they are treating such an entry as wellformed only. But if I
	have  a ">"  at the end of the last tag of the file (as given below) ,
	both throw an error. Can you please explain me this behaviour too???
	
	Eg:
	
	<doc>
	        <name1>devyani</name1>>>>>
	        <name2>raj</name2>
	</doc>>>
	
	
	Thanks
	Devyani
	
	
	
	
	
	-----Original Message-----
	From: Reid Spencer [mailto:[email protected]]
	Sent: Friday, February 17, 2006 3:21 AM
	To: [email protected]
	Cc: DEVYANI SAPRE (WT01 - Broadband Networks); Expat List
	Subject: Re: [Expat-discuss] Well formedness Validation not proper in
	EXPAT
	
	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
	
	
	The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
	
	WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
	
	www.wipro.com
	_______________________________________________
	Expat-discuss mailing list
	[email protected]
	http://mail.libexpat.org/mailman/listinfo/expat-discuss
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.