On Fri, Aug 03, 2007 at 09:28:49PM +0530, Ashwin wrote: > Ok point taken, :-) > but setting aside user defined entities. Something > like > > <element attr1= >missing AttValue in Attribute</element> > > also exhibits the same behaviour. Should it not return error, rather > than the character callback being invoked?
>paphio:~/XML -> ./testSAX test.xml >xmlSAXUserParseFile returned error 39 >SAX.setDocumentLocator() >SAX.startDocument() >SAX.error: AttValue: " or ' expected >SAX.characters(missing AttValue in Attribute, 29) >SAX.endDocument() >xmlSAXUserParseFile returned error 39 >paphio:~/XML ->
> Dohhhh. This should not happen. You need the endDocument() to > help the application clear its context, but it should not push characters. > I will investigate it is probably very easy. Thanks for pointinmg this out !
Hi, The solution like you said seems to be easy enough, at least on the face of it. In the xmlParseCharData function before invoking the character callback the check to see if the disable sax flag is set is missed out. Adding ((!ctxt->disableSAX)) at line nos 3507, 3520, 3554 and 3574 in parser.c should do the trick. Regards Ashwin
|