Re: [xml] ignorableWhitespace SAX callback



Daniel Veillard wrote:
  I think Eliotte is right, but it's like an extremist position, libxml2
fallbacks to an heuristic in that case, but I think in most cases
it will use the character() callback. See areBlanks() in parser.c .

The heuristic may not take account of not-well-formed documents, for
instance not-wf/sa/001.xml in the W3C DOM test suite.

IMHO legal blanks before and after the document root content should be
reported as ignorable, at least those contradict Eliotte position.

The XML spec says

  An XML processor MUST always pass all characters in a document that
  are not markup through to the application. A  validating XML processor
  MUST also inform the application which of these characters constitute
  white space appearing in element content.

It doesn't say you have to report ignorable white space before or after
the document root at all as these are not in element content.
-- 
Chris Burdess



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