1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-01 10:06:59 +03:00

fixed bug #129489, propagation of parsing flags in entities. improved the

* parser.c: fixed bug #129489, propagation of parsing flags
  in entities.
* parser.c xmlreader.c: improved the comments of parsing options
Daniel
This commit is contained in:
Daniel Veillard
2003-12-21 13:01:56 +00:00
parent cafe885168
commit 87ab1c1298
4 changed files with 43 additions and 34 deletions

View File

@ -1,3 +1,9 @@
Sun Dec 21 13:59:54 CET 2003 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed bug #129489, propagation of parsing flags
in entities.
* parser.c xmlreader.c: improved the comments of parsing options
Sun Dec 21 18:14:04 HKT 2003 William Brack <wbrack@mmm.com.hk> Sun Dec 21 18:14:04 HKT 2003 William Brack <wbrack@mmm.com.hk>
* python/Makefile.am, python/tests/Makefile.am, * python/Makefile.am, python/tests/Makefile.am,

View File

@ -11059,6 +11059,8 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
oldsax = ctxt->sax; oldsax = ctxt->sax;
ctxt->sax = oldctxt->sax; ctxt->sax = oldctxt->sax;
xmlDetectSAX2(ctxt); xmlDetectSAX2(ctxt);
ctxt->replaceEntities = oldctxt->replaceEntities;
ctxt->options = oldctxt->options;
ctxt->_private = oldctxt->_private; ctxt->_private = oldctxt->_private;
if (oldctxt->myDoc == NULL) { if (oldctxt->myDoc == NULL) {
@ -11438,7 +11440,7 @@ xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID,
/** /**
* xmlCreateURLParserCtxt: * xmlCreateURLParserCtxt:
* @filename: the filename or URL * @filename: the filename or URL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Create a parser context for a file or URL content. * Create a parser context for a file or URL content.
* Automatic support for ZLIB/Compress compressed document is provided * Automatic support for ZLIB/Compress compressed document is provided
@ -12324,7 +12326,7 @@ xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,
/** /**
* xmlCtxtUseOptions: * xmlCtxtUseOptions:
* @ctxt: an XML parser context * @ctxt: an XML parser context
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Applies the options to the parser context * Applies the options to the parser context
* *
@ -12420,7 +12422,7 @@ xmlCtxtUseOptions(xmlParserCtxtPtr ctxt, int options)
* @ctxt: an XML parser context * @ctxt: an XML parser context
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* @reuse: keep the context for reuse * @reuse: keep the context for reuse
* *
* Common front-end for the xmlRead functions * Common front-end for the xmlRead functions
@ -12479,7 +12481,7 @@ xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
* @cur: a pointer to a zero terminated string * @cur: a pointer to a zero terminated string
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML in-memory document and build a tree. * parse an XML in-memory document and build a tree.
* *
@ -12503,7 +12505,7 @@ xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int optio
* xmlReadFile: * xmlReadFile:
* @filename: a file or URL * @filename: a file or URL
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML file from the filesystem or the network. * parse an XML file from the filesystem or the network.
* *
@ -12526,7 +12528,7 @@ xmlReadFile(const char *filename, const char *encoding, int options)
* @size: the size of the array * @size: the size of the array
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML in-memory document and build a tree. * parse an XML in-memory document and build a tree.
* *
@ -12548,7 +12550,7 @@ xmlReadMemory(const char *buffer, int size, const char *URL, const char *encodin
* @fd: an open file descriptor * @fd: an open file descriptor
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML from a file descriptor and build a tree. * parse an XML from a file descriptor and build a tree.
* *
@ -12589,7 +12591,7 @@ xmlReadFd(int fd, const char *URL, const char *encoding, int options)
* @ioctx: an I/O handler * @ioctx: an I/O handler
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML document from I/O functions and source and build a tree. * parse an XML document from I/O functions and source and build a tree.
* *
@ -12631,7 +12633,7 @@ xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
* @cur: a pointer to a zero terminated string * @cur: a pointer to a zero terminated string
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML in-memory document and build a tree. * parse an XML in-memory document and build a tree.
* This reuses the existing @ctxt parser context * This reuses the existing @ctxt parser context
@ -12664,7 +12666,7 @@ xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur,
* @ctxt: an XML parser context * @ctxt: an XML parser context
* @filename: a file or URL * @filename: a file or URL
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML file from the filesystem or the network. * parse an XML file from the filesystem or the network.
* This reuses the existing @ctxt parser context * This reuses the existing @ctxt parser context
@ -12699,7 +12701,7 @@ xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename,
* @size: the size of the array * @size: the size of the array
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML in-memory document and build a tree. * parse an XML in-memory document and build a tree.
* This reuses the existing @ctxt parser context * This reuses the existing @ctxt parser context
@ -12741,7 +12743,7 @@ xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size,
* @fd: an open file descriptor * @fd: an open file descriptor
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML from a file descriptor and build a tree. * parse an XML from a file descriptor and build a tree.
* This reuses the existing @ctxt parser context * This reuses the existing @ctxt parser context
@ -12783,7 +12785,7 @@ xmlCtxtReadFd(xmlParserCtxtPtr ctxt, int fd,
* @ioctx: an I/O handler * @ioctx: an I/O handler
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML document from I/O functions and source and build a tree. * parse an XML document from I/O functions and source and build a tree.
* This reuses the existing @ctxt parser context * This reuses the existing @ctxt parser context

View File

@ -576,6 +576,7 @@ class xmlTextReaderCore:
# assert f is _xmlTextReaderErrorFunc # assert f is _xmlTextReaderErrorFunc
return arg return arg
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING # WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
# #
# Everything before this line comes from libxml.py # Everything before this line comes from libxml.py

View File

@ -4019,7 +4019,7 @@ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
* @reader: an XML reader * @reader: an XML reader
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* @reuse: keep the context for reuse * @reuse: keep the context for reuse
* *
* Setup an XML reader with new options * Setup an XML reader with new options
@ -4253,10 +4253,10 @@ xmlReaderWalker(xmlDocPtr doc)
* @cur: a pointer to a zero terminated string * @cur: a pointer to a zero terminated string
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Create an xmltextReader for an XML in-memory document. * Create an xmltextReader for an XML in-memory document.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* *
* Returns the new reader or NULL in case of error. * Returns the new reader or NULL in case of error.
*/ */
@ -4278,10 +4278,10 @@ xmlReaderForDoc(const xmlChar * cur, const char *URL, const char *encoding,
* xmlReaderForFile: * xmlReaderForFile:
* @filename: a file or URL * @filename: a file or URL
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML file from the filesystem or the network. * parse an XML file from the filesystem or the network.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* *
* Returns the new reader or NULL in case of error. * Returns the new reader or NULL in case of error.
*/ */
@ -4303,10 +4303,10 @@ xmlReaderForFile(const char *filename, const char *encoding, int options)
* @size: the size of the array * @size: the size of the array
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Create an xmltextReader for an XML in-memory document. * Create an xmltextReader for an XML in-memory document.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* *
* Returns the new reader or NULL in case of error. * Returns the new reader or NULL in case of error.
*/ */
@ -4338,10 +4338,10 @@ xmlReaderForMemory(const char *buffer, int size, const char *URL,
* @fd: an open file descriptor * @fd: an open file descriptor
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Create an xmltextReader for an XML from a file descriptor. * Create an xmltextReader for an XML from a file descriptor.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* *
* Returns the new reader or NULL in case of error. * Returns the new reader or NULL in case of error.
*/ */
@ -4374,10 +4374,10 @@ xmlReaderForFd(int fd, const char *URL, const char *encoding, int options)
* @ioctx: an I/O handler * @ioctx: an I/O handler
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Create an xmltextReader for an XML document from I/O functions and source. * Create an xmltextReader for an XML document from I/O functions and source.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* *
* Returns the new reader or NULL in case of error. * Returns the new reader or NULL in case of error.
*/ */
@ -4453,10 +4453,10 @@ xmlReaderNewWalker(xmlTextReaderPtr reader, xmlDocPtr doc)
* @cur: a pointer to a zero terminated string * @cur: a pointer to a zero terminated string
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Setup an xmltextReader to parse an XML in-memory document. * Setup an xmltextReader to parse an XML in-memory document.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* This reuses the existing @reader xmlTextReader. * This reuses the existing @reader xmlTextReader.
* *
* Returns 0 in case of success and -1 in case of error * Returns 0 in case of success and -1 in case of error
@ -4483,10 +4483,10 @@ xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur,
* @reader: an XML reader * @reader: an XML reader
* @filename: a file or URL * @filename: a file or URL
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* parse an XML file from the filesystem or the network. * parse an XML file from the filesystem or the network.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* This reuses the existing @reader xmlTextReader. * This reuses the existing @reader xmlTextReader.
* *
* Returns 0 in case of success and -1 in case of error * Returns 0 in case of success and -1 in case of error
@ -4517,10 +4517,10 @@ xmlReaderNewFile(xmlTextReaderPtr reader, const char *filename,
* @size: the size of the array * @size: the size of the array
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Setup an xmltextReader to parse an XML in-memory document. * Setup an xmltextReader to parse an XML in-memory document.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* This reuses the existing @reader xmlTextReader. * This reuses the existing @reader xmlTextReader.
* *
* Returns 0 in case of success and -1 in case of error * Returns 0 in case of success and -1 in case of error
@ -4550,10 +4550,10 @@ xmlReaderNewMemory(xmlTextReaderPtr reader, const char *buffer, int size,
* @fd: an open file descriptor * @fd: an open file descriptor
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Setup an xmltextReader to parse an XML from a file descriptor. * Setup an xmltextReader to parse an XML from a file descriptor.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* This reuses the existing @reader xmlTextReader. * This reuses the existing @reader xmlTextReader.
* *
* Returns 0 in case of success and -1 in case of error * Returns 0 in case of success and -1 in case of error
@ -4583,11 +4583,11 @@ xmlReaderNewFd(xmlTextReaderPtr reader, int fd,
* @ioctx: an I/O handler * @ioctx: an I/O handler
* @URL: the base URL to use for the document * @URL: the base URL to use for the document
* @encoding: the document encoding, or NULL * @encoding: the document encoding, or NULL
* @options: a combination of xmlParserOption(s) * @options: a combination of xmlParserOption
* *
* Setup an xmltextReader to parse an XML document from I/O functions * Setup an xmltextReader to parse an XML document from I/O functions
* and source. * and source.
* The parsing flags @options are a combination of xmlParserOption(s). * The parsing flags @options are a combination of xmlParserOption.
* This reuses the existing @reader xmlTextReader. * This reuses the existing @reader xmlTextReader.
* *
* Returns 0 in case of success and -1 in case of error * Returns 0 in case of success and -1 in case of error