[xml] Incorrect character callback invocation?



Hi,

I am having a problem with the parsing some documents which are not well-formed. The parser seems to catch the error, but then strangely instead of stopping at that point and returning an error, it proceeds to invoke the character callback. I am not sure whether this is the expected behaviour.

 

 I am attaching the relevant test files and providing a brief description of the problem. I am working with LibXml version 2.26.28.

 

ibm09n01, ibm09n02---- These files contain the declaration of an invalid entity value in an internal subset, the error is caught but character callback is invoked for the character content inside the start element.

 

ibm10n02, ibm10n06----The test is to check for an invalid attribute value, however again I get a characters callback for the character data present as the content of the lone element which contains an invalid attribute value.

 

ibm15n01---Invalid Comment

 

ibm17n01, ibm17n02, ibm17n03, ibm17n04-----Invalid PI’s

 

ibm29n01----Contains an illegal markup declaration in the DTD

ibm29n02----Parameter references appear inside element declaration.

 

As I have mentioned, the common problem happens to be that the error conditions are not flagged as such, and furthermore instead of the parsing being stopped I get a character callback for the character content associated with that particular element.

 

 

 

 

 

Regards

Ashwin Sinha

 

The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.

The real art of conversation is not only to say the right thing at the right place but to leave unsaid the wrong thing at the tempting moment.

Wise Men descend from heaven, and they SMOKE from 9 to Seven. Love is an exploding cigar we willingly smoke.

Virtue is its own PUNISHMENT.

 

Expectations that have gotten out of hand, will lead to absolute disappointment, no matter what happens in the end, for nothing, nothing, can satisfy it -- they are, but illusions -- chase your own shadow, you will find that eventually catching up with it is just an illusion, though it seems so plausible. (perhaps a meaningful life is like that too? -- just an illusion?)

 

 

 

 

 

 

 

 

Attachment: ibm09n02.xml
Description: Text Data

Attachment: ibm09n01.xml
Description: Text Data

Attachment: ibm10n06.xml
Description: Text Data

Attachment: ibm10n02.xml
Description: Text Data

Attachment: ibm15n01.xml
Description: Text Data

Attachment: ibm17n04.xml
Description: Text Data

Attachment: ibm17n01.xml
Description: Text Data

Attachment: ibm17n02.xml
Description: Text Data

Attachment: ibm17n03.xml
Description: Text Data

Attachment: ibm29n02.xml
Description: Text Data

Attachment: ibm29n01.xml
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]