Blanks handling function, added 2.x upgrade doc, Daniel
diff --git a/ChangeLog b/ChangeLog
index 218fc8d..b1984e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Mar  4 12:38:41 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+	* doc/upgrade.html: instruction on how to upgrade from 1.x to 2.x
+	  added
+	* parser.c: adding xmlKeepBlanksDefault() as a way to manage
+	  compatibility w.r.t. XML spec and existing code.
+
 Thu Mar  2 04:45:15 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
 
 	* parser.c: seems a better solution to <a>   </a> exists,
diff --git a/parser.c b/parser.c
index 2823682..8107168 100644
--- a/parser.c
+++ b/parser.c
@@ -8745,3 +8745,36 @@
     return(old);
 }
 
+/**
+ * xmlKeepBlanksDefault:
+ * @val:  int 0 or 1 
+ *
+ * Set and return the previous value for default blanks text nodes support.
+ * The 1.x version of the parser used an heuristic to try to detect
+ * ignorable white spaces. As a result the SAX callback was generating
+ * ignorableWhitespace() callbacks instead of characters() one, and when
+ * using the DOM output text nodes containing those blanks were not generated.
+ * The 2.x and later version will switch to the XML standard way and
+ * ignorableWhitespace() are only generated when running the parser in
+ * validating mode and when the current element doesn't allow CDATA or
+ * mixed content.
+ * This function is provided as a way to force the standard behaviour 
+ * on 1.X libs and to switch back to the old mode for compatibility when
+ * running 1.X client code on 2.X . Upgrade of 1.X code should be done
+ * by using xmlIsBlankNode() commodity function to detect the "empty"
+ * nodes generated.
+ * This value also affect autogeneration of indentation when saving code
+ * if blanks sections are kept, indentation is not generated.
+ *
+ * Returns the last value for 0 for no substitution, 1 for substitution.
+ */
+
+int
+xmlKeepBlanksDefault(int val) {
+    int old = xmlKeepBlanksDefaultValue;
+
+    xmlKeepBlanksDefaultValue = val;
+    xmlIndentTreeOutput = !val;
+    return(old);
+}
+