extended the XmlTextReader API a bit, addding accessors for the current

* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml:
  extended the XmlTextReader API a bit, addding accessors for
  the current doc and node, and an entity substitution mode for
  the parser.
* python/libxml.py python/libxml2class.txt: related updates
* python/tests/Makefile.am python/tests/reader.py
  python/tests/reader2.py python/tests/reader3.py: updated a bit
  the old tests and added a new one to test the entities handling
Daniel
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index d92e9ea..b680ace 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -1092,6 +1092,7 @@
     <file name='xmlreader'>
      <exports symbol='XML_PARSER_DEFAULTATTRS'/>
      <exports symbol='XML_PARSER_LOADDTD'/>
+     <exports symbol='XML_PARSER_SUBST_ENTITIES'/>
      <exports symbol='XML_PARSER_VALIDATE'/>
      <exports symbol='xmlFreeTextReader'/>
      <exports symbol='xmlNewTextReader'/>
@@ -1101,6 +1102,8 @@
      <exports symbol='xmlTextReaderAttributeCount'/>
      <exports symbol='xmlTextReaderBaseUri'/>
      <exports symbol='xmlTextReaderClose'/>
+     <exports symbol='xmlTextReaderCurrentDoc'/>
+     <exports symbol='xmlTextReaderCurrentNode'/>
      <exports symbol='xmlTextReaderDepth'/>
      <exports symbol='xmlTextReaderGetAttribute'/>
      <exports symbol='xmlTextReaderGetAttributeNo'/>
@@ -2382,6 +2385,7 @@
     <enum name='XML_PARSER_PUBLIC_LITERAL' file='parser' value='16' type='xmlParserInputState' info=' within a PUBLIC value'/>
     <enum name='XML_PARSER_START' file='parser' value='0' type='xmlParserInputState' info='nothing has been parsed'/>
     <enum name='XML_PARSER_START_TAG' file='parser' value='6' type='xmlParserInputState' info='within a start tag'/>
+    <enum name='XML_PARSER_SUBST_ENTITIES' file='xmlreader' value='4' type='xmlParserProperties'/>
     <enum name='XML_PARSER_SYSTEM_LITERAL' file='parser' value='13' type='xmlParserInputState' info='within a SYSTEM value'/>
     <enum name='XML_PARSER_VALIDATE' file='xmlreader' value='3' type='xmlParserProperties'/>
     <enum name='XML_PI_NODE' file='tree' value='7' type='xmlElementType'/>
@@ -7917,6 +7921,16 @@
       <return type='int' info='0 or -1 in case of error'/>
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
+    <function name='xmlTextReaderCurrentDoc' file='xmlreader'>
+      <info>Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader. This is dangerous because the associated node may be destroyed on the next Reads.</info>
+      <return type='xmlDocPtr' info='the xmlDocPtr or NULL in case of error.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderCurrentNode' file='xmlreader'>
+      <info>Hacking interface allowing to get the xmlNodePtr correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.</info>
+      <return type='xmlNodePtr' info='the xmlNodePtr or NULL in case of error.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
     <function name='xmlTextReaderDepth' file='xmlreader'>
       <info>The depth of the node in the tree.</info>
       <return type='int' info='the depth or -1 in case of error'/>