[xml] problem with cdata blocks in sax-based schema-validation


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


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;

Any ideas where to search for the source of this problem?



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