I've started using xmlSchemaSAXPlug and noticed that my charactersSAXFunc 
callback is no more called for CDATA content.

The parser does the following fall back:
if (ctxt->sax->cdataBlock != NULL)
ctxt->input->cur, base);
else if (ctxt->sax->characters != NULL)
ctxt->input->cur, base);

the "plugged" cdataBlockSplit does not the same fall back, means my characters 
call back is not called anymore when I use the SAXplug

static void
cdataBlockSplit(void *ctx, const xmlChar *value, int len)
    xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
    if (ctxt == NULL)
    if ((ctxt->user_sax != NULL) &&
        (ctxt->user_sax->cdataBlock != NULL))
                ctxt->user_sax->cdataBlock(ctxt->user_data, value, len);
    if (ctxt->ctxt != NULL)
                xmlSchemaSAXHandleCDataSection(ctxt->ctxt, value, len);

I've fixed it in my code now by settings the same function to cdataBlockSAXFunc 
as for charactersSAXFunc.

My main concern would be, are there any other call backs where similar fall 
backs are applied and may be impacted by the SAXplug?
Should this be fixed in libxml to do the same fall back in cdataBlockSplit?


Handelsregister beim Amtsgericht Würzburg / Commercial Register Würzburg HRB 
Geschäftsführer / Managing Directors: Johannes Angenvoort, Mike Wiegers, Andrew 

This Email, including any attachment/s, is confidential and intended only for 
the individuals or company named above. If you are not the intended recipient, 
please do not read, copy, use or disclose the contents of this communication to 
others. Please notify the sender that you have received this e-mail in error, 
by calling the phone number indicated or by Email, and delete the Email, 
including any attachment, subsequently. The information contained in this Email 
may be subject to professional secrecy (e. g. of auditor, tax or legal 
advisor), other privilege or otherwise be protected by work product immunity or 
other legal rules. Thank you.
xml mailing list, project page  http://xmlsoft.org/

Reply via email to