diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html index a394f13ada7fea2651b24d49b463a47a59f70390_ZG9jL2RldmhlbHAvbGlieG1sMi1wYXJzZXIuaHRtbA==..b66c3ebb9dd60a5548f20068ae907960f6aed997_ZG9jL2RldmhlbHAvbGlieG1sMi1wYXJzZXIuaHRtbA== 100644 --- a/doc/devhelp/libxml2-parser.html +++ b/doc/devhelp/libxml2-parser.html @@ -1851,7 +1851,7 @@ <a name="xmlKeepBlanksDefault"></a>xmlKeepBlanksDefault ()</h3> <pre class="programlisting">int xmlKeepBlanksDefault (int val)<br> </pre> -<p>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 xmlSAX2IgnorableWhitespace() 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 behavior 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.</p> +<p>DEPRECATED: Use the modern options API with <a href="libxml2-parser.html#XML_PARSE_NOBLANKS">XML_PARSE_NOBLANKS</a>. 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 xmlSAX2IgnorableWhitespace() 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 behavior 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.</p> <div class="variablelist"><table border="0"> <col align="left"> <tbody> @@ -1872,7 +1872,7 @@ <a name="xmlLineNumbersDefault"></a>xmlLineNumbersDefault ()</h3> <pre class="programlisting">int xmlLineNumbersDefault (int val)<br> </pre> -<p>Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</p> +<p>DEPRECATED: The modern options API always enables line numbers. Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</p> <div class="variablelist"><table border="0"> <col align="left"> <tbody> diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index a394f13ada7fea2651b24d49b463a47a59f70390_ZG9jL2xpYnhtbDItYXBpLnhtbA==..b66c3ebb9dd60a5548f20068ae907960f6aed997_ZG9jL2xpYnhtbDItYXBpLnhtbA== 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -10721,7 +10721,7 @@ <arg name='publicID' type='const xmlChar *' info='the public identifier'/> </function> <function name='xmlKeepBlanksDefault' file='parser' module='parserInternals'> - <info>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 xmlSAX2IgnorableWhitespace() 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 behavior 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.</info> + <info>DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS. 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 xmlSAX2IgnorableWhitespace() 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 behavior 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.</info> <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/> <arg name='val' type='int' info='int 0 or 1'/> </function> @@ -10732,7 +10732,7 @@ <arg name='parent' type='xmlNodePtr' info='the parent node'/> </function> <function name='xmlLineNumbersDefault' file='parser' module='parserInternals'> - <info>Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</info> + <info>DEPRECATED: The modern options API always enables line numbers. Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</info> <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/> <arg name='val' type='int' info='int 0 or 1'/> </function> diff --git a/parserInternals.c b/parserInternals.c index a394f13ada7fea2651b24d49b463a47a59f70390_cGFyc2VySW50ZXJuYWxzLmM=..b66c3ebb9dd60a5548f20068ae907960f6aed997_cGFyc2VySW50ZXJuYWxzLmM= 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -2013,6 +2013,8 @@ * xmlLineNumbersDefault: * @val: int 0 or 1 * + * DEPRECATED: The modern options API always enables line numbers. + * * Set and return the previous value for enabling line numbers in elements * contents. This may break on old application and is turned off by default. * @@ -2055,6 +2057,8 @@ * xmlKeepBlanksDefault: * @val: int 0 or 1 * + * DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS. + * * 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