mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-02 20:42:30 +03:00
parser: Deprecate global parser options
Note that setting global options has no effect anyway when using any of the modern parser API functions which take an option argument like xmlReadMemory or when using xmlCtxtUseOptions. Global options only have an effect when using old API functions xmlParse* or xmlSAXParse* or when using an xmlParserCtxt without calling xmlCtxtUseOptions. Unfortunately, many downstream projects still modify global parser options often without realizing that it has no effect. If necessary, switch to the modern API. Then you can safely remove all code that changes global options. Here's a list of deprecated functions and global variables together with the corresponding parser options. - xmlSubstituteEntitiesDefault, xmlSubstituteEntitiesDefaultValue Parser option XML_PARSE_NOENT - xmlKeepBlanksDefault, xmlKeepBlanksDefaultValue Inverse of parser option XML_PARSE_NOBLANKS - xmlPedanticParserDefault, xmlPedanticParserDefaultValue Parser option XML_PARSE_PEDANTIC - xmlLineNumbersDefault, xmlLineNumbersDefaultValue Always enabled by new API - xmlDoValidityCheckingDefaultValue Parser option XML_PARSE_DTDVALID - xmlGetWarningsDefaultValue Inverse of parser option XML_PARSE_NOWARNING - xmlLoadExtDtdDefaultValue Parser options XML_PARSE_DTDLOAD and XML_PARSE_DTDATTR
This commit is contained in:
@ -310,6 +310,8 @@ deprecated_funcs = {
|
||||
'xmlInitializeDict': True,
|
||||
'xmlInitializePredefinedEntities': True,
|
||||
'xmlIsRef': True,
|
||||
'xmlKeepBlanksDefault': True,
|
||||
'xmlLineNumbersDefault': True,
|
||||
'xmlNamespaceParseNCName': True,
|
||||
'xmlNamespaceParseNSDef': True,
|
||||
'xmlNanoFTPCleanup': True,
|
||||
@ -354,6 +356,7 @@ deprecated_funcs = {
|
||||
'xmlParseXMLDecl': True,
|
||||
'xmlParserHandlePEReference': True,
|
||||
'xmlParserHandleReference': True,
|
||||
'xmlPedanticParserDefault': True,
|
||||
'xmlRecoverDoc': True,
|
||||
'xmlRecoverFile': True,
|
||||
'xmlRecoverMemory': True,
|
||||
@ -368,9 +371,16 @@ deprecated_funcs = {
|
||||
'xmlSkipBlankChars': True,
|
||||
'xmlStringDecodeEntities': True,
|
||||
'xmlStringLenDecodeEntities': True,
|
||||
'xmlSubstituteEntitiesDefault': True,
|
||||
'xmlThrDefDefaultBufferSize': True,
|
||||
'xmlThrDefDoValidityCheckingDefaultValue': True,
|
||||
'xmlThrDefGetWarningsDefaultValue': True,
|
||||
'xmlThrDefKeepBlanksDefaultValue': True,
|
||||
'xmlThrDefLineNumbersDefaultValue': True,
|
||||
'xmlThrDefLoadExtDtdDefaultValue': True,
|
||||
'xmlThrDefParserDebugEntities': True,
|
||||
'xmlThrDefPedanticParserDefaultValue': True,
|
||||
'xmlThrDefSubstituteEntitiesDefaultValue': True,
|
||||
'xmlXPathInit': True,
|
||||
'xmlXPtrEvalRangePredicate': True,
|
||||
'xmlXPtrNewCollapsedRange': True,
|
||||
|
Reference in New Issue
Block a user