Hi,
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:
parser.c
...
if (ctxt->sax->cdataBlock != NULL)
ctxt->sax->cdataBlock(ctxt->userData,
ctxt->input->cur, base);
else if (ctxt->sax->characters != NULL)
ctxt->sax->characters(ctxt->userData,
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
xmlschemas.c
static void
cdataBlockSplit(void *ctx, const xmlChar *value, int len)
{
xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
if (ctxt == NULL)
return;
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?
Thanks,
Andrej
Handelsregister beim Amtsgericht Würzburg / Commercial Register Würzburg HRB
11347
Geschäftsführer / Managing Directors: Johannes Angenvoort, Mike Wiegers, Andrew
Etkind
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/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml