[xml] problem with cdata blocks in sax-based schema-validation
- From: Holger Kaelberer <hkaelber math uni-bielefeld de>
- To: xml gnome org
- Subject: [xml] problem with cdata blocks in sax-based schema-validation
- Date: Mon, 16 Jun 2008 10:36:12 +0200
Hi,
using a schema validation layer in a sax2-stream I get the problem, that
strings contained in CDATA blocks in the xml-file are not parsed, i.e. I get
null-pointers in the characters sax handler for elements like
<bindpass><![CDATA[bla<>bla]]></bindpass>
Basically I am doing something like this (following the sequence in xmllint.c)
/---
vctxt = xmlSchemaNewValidCtxt(schema_ptr);
buf = xmlParserInputBufferCreateFilename(fname, XML_CHAR_ENCODING_NONE);
r = xmlSchemaValidateStream(vctxt, buf, XML_CHAR_ENCODING_NONE, (xmlSAXHandlerPtr) &parser_handler,
---/ state);
(Except for this problme the validation works fine.)
It seems to be a problem inside the xmlschema-part because without
schema-validation the cdata-blocks are handled correctly, when I do
something like:
/---
ctxt = xmlCreateFileParserCtxt(fname);
ctxt->sax = &parser_handler;
xmlParseDocument(ctxt);
---/
Any ideas where to search for the source of this problem?
Thanks,
Holger
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]