Re: [xml] Loss of whitespace

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Mar 02 2000 - 20:51:39 EST


  Following the feedback received I have made version 2.x comply with
the XML specification. All blanks spaces are passed to SAX as characters()
with the only exception of doing validating parsing and the element
is not defined as CDATA nor mixed content. The xml:space="preserve"
is looked for in 2.x code and in that case blanks which can be ignored
accordingly to the Dtd are passed anyway through characters(), and will
generate nodes in the DOM tree.
  I hope that my reading of the spec is right now.
  I have spotted that point in the upgrade documentation, and made
a specific function:

 int xmlKeepBlanksDefault (int val);

which can be called by 1.x code if they want to stick to the old
behaviour when linking to 2.x. This function will also allow code
linked against 1.8.7 and successor to force the "keep blanks" behaviour.
I also provided a commodity function:

 int xmlIsBlankNode (xmlNodePtr node);

to detect blank nodes when navigating a generated DOM tree.

  I hope that this annoying issue is closed, but somewhat I doubt it :-\

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:07 EDT