Re: [xml] ignorableWhitespace-callback

On Thu, Sep 06, 2001 at 04:32:48PM +0200, Henke, Markus wrote:

i've a parser context with a self-defined ignorableWhitespaceSAXFunc

  pctxt->sax->ignorableWhitespace = myIgnorableWhitespaceFunc;

which do nothing than to trace the callback.
Now i try to validate a document against it's DTD that doesn't allow CDATA
or mixed content in any Element.
When i got the docs right, the parser has to callback the
ignorableWhitespaceSAXFunc in that scenario
if he runs on whitespace like tabs or CR/LF in the document-body.
But my trace-file remains empty, seems that the ignorableWhitespaceSAXFunc
was ignored...   8)
Or is there something that i've missed?


 all this processing belongs to parser.c:

xmlParseCharData() calls areBlanks() to check for this and
uses the ignorableWhitespace() callback if this is the case.

The xmlIsMixedElement() is called by areBlanks(), and will
return 0 or 1 in the case a DTD is present.

But this processing is conditionned by ctxt->keepBlanks.
You can try to set it by calling xmlKeepBlanksDefault(0) before
calling the parser or creating the context.

I need a better handling for this, I will try to get this fixed
more cleanly in the next version,


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

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