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
diff --git a/ChangeLog b/ChangeLog
index 1072b12..668b551 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
 	* python/Makefile.am, python/tests/Makefile.am,
diff --git a/parser.c b/parser.c
index fde9bdf..e6aefea 100644
--- a/parser.c
+++ b/parser.c
@@ -11059,6 +11059,8 @@
     oldsax = ctxt->sax;
     ctxt->sax = oldctxt->sax;
     xmlDetectSAX2(ctxt);
+    ctxt->replaceEntities = oldctxt->replaceEntities;
+    ctxt->options = oldctxt->options;
     
     ctxt->_private = oldctxt->_private;
     if (oldctxt->myDoc == NULL) {
@@ -11438,7 +11440,7 @@
 /**
  * xmlCreateURLParserCtxt:
  * @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. 
  * Automatic support for ZLIB/Compress compressed document is provided
@@ -12324,7 +12326,7 @@
 /**
  * xmlCtxtUseOptions:
  * @ctxt: an XML parser context
- * @options:  a combination of xmlParserOption(s)
+ * @options:  a combination of xmlParserOption
  *
  * Applies the options to the parser context
  *
@@ -12420,7 +12422,7 @@
  * @ctxt:  an XML parser context
  * @URL:  the base URL to use for the document
  * @encoding:  the document encoding, or NULL
- * @options:  a combination of xmlParserOption(s)
+ * @options:  a combination of xmlParserOption
  * @reuse:  keep the context for reuse
  *
  * Common front-end for the xmlRead functions
@@ -12479,7 +12481,7 @@
  * @cur:  a pointer to a zero terminated string
  * @URL:  the base URL to use for the document
  * @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.
  * 
@@ -12503,7 +12505,7 @@
  * xmlReadFile:
  * @filename:  a file or URL
  * @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.
  * 
@@ -12526,7 +12528,7 @@
  * @size:  the size of the array
  * @URL:  the base URL to use for the document
  * @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.
  * 
@@ -12548,7 +12550,7 @@
  * @fd:  an open file descriptor
  * @URL:  the base URL to use for the document
  * @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.
  * 
@@ -12589,7 +12591,7 @@
  * @ioctx:  an I/O handler
  * @URL:  the base URL to use for the document
  * @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.
  * 
@@ -12631,7 +12633,7 @@
  * @cur:  a pointer to a zero terminated string
  * @URL:  the base URL to use for the document
  * @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.
  * This reuses the existing @ctxt parser context
@@ -12664,7 +12666,7 @@
  * @ctxt:  an XML parser context
  * @filename:  a file or URL
  * @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.
  * This reuses the existing @ctxt parser context
@@ -12699,7 +12701,7 @@
  * @size:  the size of the array
  * @URL:  the base URL to use for the document
  * @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.
  * This reuses the existing @ctxt parser context
@@ -12741,7 +12743,7 @@
  * @fd:  an open file descriptor
  * @URL:  the base URL to use for the document
  * @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.
  * This reuses the existing @ctxt parser context
@@ -12783,7 +12785,7 @@
  * @ioctx:  an I/O handler
  * @URL:  the base URL to use for the document
  * @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.
  * This reuses the existing @ctxt parser context
diff --git a/python/libxml.py b/python/libxml.py
index 92c4c3c..4d643f9 100644
--- a/python/libxml.py
+++ b/python/libxml.py
@@ -576,6 +576,7 @@
             # assert f is _xmlTextReaderErrorFunc
             return arg
 
+
 # WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 #
 # Everything before this line comes from libxml.py 
diff --git a/xmlreader.c b/xmlreader.c
index bfcc053..fa2ed32 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -4019,7 +4019,7 @@
  * @reader:  an XML reader
  * @URL:  the base URL to use for the document
  * @encoding:  the document encoding, or NULL
- * @options:  a combination of xmlParserOption(s)
+ * @options:  a combination of xmlParserOption
  * @reuse:  keep the context for reuse
  *
  * Setup an XML reader with new options
@@ -4253,10 +4253,10 @@
  * @cur:  a pointer to a zero terminated string
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  */
@@ -4278,10 +4278,10 @@
  * xmlReaderForFile:
  * @filename:  a file or URL
  * @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.
- * 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.
  */
@@ -4303,10 +4303,10 @@
  * @size:  the size of the array
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  */
@@ -4338,10 +4338,10 @@
  * @fd:  an open file descriptor
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  */
@@ -4374,10 +4374,10 @@
  * @ioctx:  an I/O handler
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  */
@@ -4453,10 +4453,10 @@
  * @cur:  a pointer to a zero terminated string
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  * 
  * Returns 0 in case of success and -1 in case of error
@@ -4483,10 +4483,10 @@
  * @reader:  an XML reader
  * @filename:  a file or URL
  * @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.
- * 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.
  * 
  * Returns 0 in case of success and -1 in case of error
@@ -4517,10 +4517,10 @@
  * @size:  the size of the array
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  * 
  * Returns 0 in case of success and -1 in case of error
@@ -4550,10 +4550,10 @@
  * @fd:  an open file descriptor
  * @URL:  the base URL to use for the document
  * @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.
- * 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.
  * 
  * Returns 0 in case of success and -1 in case of error
@@ -4583,11 +4583,11 @@
  * @ioctx:  an I/O handler
  * @URL:  the base URL to use for the document
  * @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
  * 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.
  * 
  * Returns 0 in case of success and -1 in case of error