mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Add XML_PARSE_SKIP_IDS to replace XML_SKIP_IDS
Mark loadset member as deprecated Fixes #873
This commit is contained in:
@@ -489,8 +489,7 @@ struct _xmlParserCtxt {
|
||||
* process default attributes.
|
||||
* - XML_SKIP_IDS: Load external subset and ignore IDs.
|
||||
*/
|
||||
/* TODO: See issue #873 */
|
||||
int loadsubset;
|
||||
int loadsubset XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int linenumbers XML_DEPRECATED_MEMBER;
|
||||
/**
|
||||
@@ -1861,7 +1860,13 @@ typedef enum {
|
||||
*
|
||||
* @since 2.14.0
|
||||
*/
|
||||
XML_PARSE_CATALOG_PI = 1<<26
|
||||
XML_PARSE_CATALOG_PI = 1<<26,
|
||||
/**
|
||||
* Force the parser to ignore IDs.
|
||||
*
|
||||
* @since 2.15.0
|
||||
*/
|
||||
XML_PARSE_SKIP_IDS = 1<<27
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void
|
||||
|
2
parser.c
2
parser.c
@@ -12065,6 +12065,7 @@ xmlCtxtParseContent(xmlParserCtxt *ctxt, xmlParserInput *input,
|
||||
* Disable IDs
|
||||
*/
|
||||
ctxt->loadsubset |= XML_SKIP_IDS;
|
||||
ctxt->options |= XML_PARSE_SKIP_IDS;
|
||||
|
||||
ctxt->myDoc = doc;
|
||||
|
||||
@@ -13142,6 +13143,7 @@ xmlCtxtSetOptionsInternal(xmlParserCtxtPtr ctxt, int options, int keepMask)
|
||||
ctxt->replaceEntities = (options & XML_PARSE_NOENT) ? 1 : 0;
|
||||
ctxt->loadsubset = (options & XML_PARSE_DTDLOAD) ? XML_DETECT_IDS : 0;
|
||||
ctxt->loadsubset |= (options & XML_PARSE_DTDATTR) ? XML_COMPLETE_ATTRS : 0;
|
||||
ctxt->loadsubset |= (options & XML_PARSE_SKIP_IDS) ? XML_SKIP_IDS : 0;
|
||||
ctxt->validate = (options & XML_PARSE_DTDVALID) ? 1 : 0;
|
||||
ctxt->pedantic = (options & XML_PARSE_PEDANTIC) ? 1 : 0;
|
||||
ctxt->keepBlanks = (options & XML_PARSE_NOBLANKS) ? 0 : 1;
|
||||
|
Reference in New Issue
Block a user