Skip to content

Commit ca3807d

Browse files
committed
Mark more functions setting globals as deprecated
1 parent 74c84a8 commit ca3807d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

doc/devhelp/libxml2-parser.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ <h3>
18511851
<a name="xmlKeepBlanksDefault"></a>xmlKeepBlanksDefault ()</h3>
18521852
<pre class="programlisting">int xmlKeepBlanksDefault (int val)<br>
18531853
</pre>
1854-
<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>
1854+
<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>
18551855
<div class="variablelist"><table border="0">
18561856
<col align="left">
18571857
<tbody>
@@ -1872,7 +1872,7 @@ <h3>
18721872
<a name="xmlLineNumbersDefault"></a>xmlLineNumbersDefault ()</h3>
18731873
<pre class="programlisting">int xmlLineNumbersDefault (int val)<br>
18741874
</pre>
1875-
<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>
1875+
<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>
18761876
<div class="variablelist"><table border="0">
18771877
<col align="left">
18781878
<tbody>

doc/libxml2-api.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10721,7 +10721,7 @@ Could we use @subtypes for this?'/>
1072110721
<arg name='publicID' type='const xmlChar *' info='the public identifier'/>
1072210722
</function>
1072310723
<function name='xmlKeepBlanksDefault' file='parser' module='parserInternals'>
10724-
<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&apos;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 &quot;empty&quot; nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.</info>
10724+
<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&apos;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 &quot;empty&quot; nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.</info>
1072510725
<return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
1072610726
<arg name='val' type='int' info='int 0 or 1'/>
1072710727
</function>
@@ -10732,7 +10732,7 @@ Could we use @subtypes for this?'/>
1073210732
<arg name='parent' type='xmlNodePtr' info='the parent node'/>
1073310733
</function>
1073410734
<function name='xmlLineNumbersDefault' file='parser' module='parserInternals'>
10735-
<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>
10735+
<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>
1073610736
<return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
1073710737
<arg name='val' type='int' info='int 0 or 1'/>
1073810738
</function>

parserInternals.c

+4
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,8 @@ xmlPedanticParserDefault(int val) {
20132013
* xmlLineNumbersDefault:
20142014
* @val: int 0 or 1
20152015
*
2016+
* DEPRECATED: The modern options API always enables line numbers.
2017+
*
20162018
* Set and return the previous value for enabling line numbers in elements
20172019
* contents. This may break on old application and is turned off by default.
20182020
*
@@ -2055,6 +2057,8 @@ xmlSubstituteEntitiesDefault(int val) {
20552057
* xmlKeepBlanksDefault:
20562058
* @val: int 0 or 1
20572059
*
2060+
* DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS.
2061+
*
20582062
* Set and return the previous value for default blanks text nodes support.
20592063
* The 1.x version of the parser used an heuristic to try to detect
20602064
* ignorable white spaces. As a result the SAX callback was generating

0 commit comments

Comments
 (0)