preparing a 2.6.0-beta2 release avoid a warning avoid duplicate code in

* configure.in: preparing a 2.6.0-beta2 release
* xmlIO.c: avoid a warning
* tree.c: avoid duplicate code in xmlReplaceNode as pointed out
  by Chris Ryland
* include/libxml/dict.h: add a QName access lookup to the
  dictionary.
* xmlreader.c include/libxml/xmlreader.h: adding const access
  based on the dictionary interface for string read from the
  reader, the node content access is still TODO, it's too different
Daniel
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index f7b8918..d681181 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -518,7 +518,6 @@
      <exports symbol='docbDocPtr'/>
      <exports symbol='docbEncodeEntities'/>
      <exports symbol='docbFreeParserCtxt'/>
-     <exports symbol='docbNodePtr'/>
      <exports symbol='docbParseChunk'/>
      <exports symbol='docbParseDoc'/>
      <exports symbol='docbParseDocument'/>
@@ -527,7 +526,6 @@
      <exports symbol='docbParserCtxtPtr'/>
      <exports symbol='docbParserInput'/>
      <exports symbol='docbParserInputPtr'/>
-     <exports symbol='docbParserNodeInfo'/>
      <exports symbol='docbSAXHandler'/>
      <exports symbol='docbSAXHandlerPtr'/>
      <exports symbol='docbSAXParseDoc'/>
@@ -858,6 +856,7 @@
      <exports symbol='xmlParserInputBufferCreateFilename'/>
      <exports symbol='xmlParserInputBufferCreateIO'/>
      <exports symbol='xmlParserInputBufferCreateMem'/>
+     <exports symbol='xmlParserInputBufferCreateStatic'/>
      <exports symbol='xmlParserInputBufferGrow'/>
      <exports symbol='xmlParserInputBufferPush'/>
      <exports symbol='xmlParserInputBufferRead'/>
@@ -1296,6 +1295,12 @@
      <exports symbol='xmlTextReaderAttributeCount'/>
      <exports symbol='xmlTextReaderBaseUri'/>
      <exports symbol='xmlTextReaderClose'/>
+     <exports symbol='xmlTextReaderConstBaseUri'/>
+     <exports symbol='xmlTextReaderConstLocalName'/>
+     <exports symbol='xmlTextReaderConstName'/>
+     <exports symbol='xmlTextReaderConstNamespaceUri'/>
+     <exports symbol='xmlTextReaderConstPrefix'/>
+     <exports symbol='xmlTextReaderConstXmlLang'/>
      <exports symbol='xmlTextReaderCurrentDoc'/>
      <exports symbol='xmlTextReaderCurrentNode'/>
      <exports symbol='xmlTextReaderDepth'/>
@@ -1469,7 +1474,9 @@
      <exports symbol='xmlDictCreate'/>
      <exports symbol='xmlDictFree'/>
      <exports symbol='xmlDictLookup'/>
+     <exports symbol='xmlDictOwns'/>
      <exports symbol='xmlDictPtr'/>
+     <exports symbol='xmlDictQLookup'/>
      <exports symbol='xmlDictSize'/>
     </file>
     <file name='xmlexports'>
@@ -1629,6 +1636,7 @@
      <exports symbol='XML_ERR_CHARREF_IN_PROLOG'/>
      <exports symbol='XML_ERR_COMMENT_NOT_FINISHED'/>
      <exports symbol='XML_ERR_CONDSEC_INVALID'/>
+     <exports symbol='XML_ERR_CONDSEC_INVALID_KEYWORD'/>
      <exports symbol='XML_ERR_CONDSEC_NOT_FINISHED'/>
      <exports symbol='XML_ERR_CONDSEC_NOT_STARTED'/>
      <exports symbol='XML_ERR_DOCTYPE_NOT_FINISHED'/>
@@ -1707,8 +1715,13 @@
      <exports symbol='XML_ERR_URI_FRAGMENT'/>
      <exports symbol='XML_ERR_URI_REQUIRED'/>
      <exports symbol='XML_ERR_VALUE_REQUIRED'/>
+     <exports symbol='XML_ERR_VERSION_MISSING'/>
      <exports symbol='XML_ERR_XMLDECL_NOT_FINISHED'/>
      <exports symbol='XML_ERR_XMLDECL_NOT_STARTED'/>
+     <exports symbol='XML_NS_ERR_ATTRIBUTE_REDEFINED'/>
+     <exports symbol='XML_NS_ERR_QNAME'/>
+     <exports symbol='XML_NS_ERR_UNDEFINED_NAMESPACE'/>
+     <exports symbol='XML_NS_ERR_XML_NAMESPACE'/>
      <exports symbol='XML_WAR_CATALOG_PI'/>
      <exports symbol='XML_WAR_UNDECLARED_ENTITY'/>
      <exports symbol='initGenericErrorDefaultFunc'/>
@@ -1743,6 +1756,7 @@
      <exports symbol='XML_ATTRIBUTE_REQUIRED'/>
      <exports symbol='XML_BUFFER_ALLOC_DOUBLEIT'/>
      <exports symbol='XML_BUFFER_ALLOC_EXACT'/>
+     <exports symbol='XML_BUFFER_ALLOC_IMMUTABLE'/>
      <exports symbol='XML_CDATA_SECTION_NODE'/>
      <exports symbol='XML_COMMENT_NODE'/>
      <exports symbol='XML_DOCB_DOCUMENT_NODE'/>
@@ -1814,6 +1828,7 @@
      <exports symbol='xmlBufferContent'/>
      <exports symbol='xmlBufferCreate'/>
      <exports symbol='xmlBufferCreateSize'/>
+     <exports symbol='xmlBufferCreateStatic'/>
      <exports symbol='xmlBufferDump'/>
      <exports symbol='xmlBufferEmpty'/>
      <exports symbol='xmlBufferFree'/>
@@ -2673,6 +2688,7 @@
     <enum name='XML_ATTRIBUTE_REQUIRED' file='tree' value='2' type='xmlAttributeDefault'/>
     <enum name='XML_BUFFER_ALLOC_DOUBLEIT' file='tree' value='1' type='xmlBufferAllocationScheme'/>
     <enum name='XML_BUFFER_ALLOC_EXACT' file='tree' value='2' type='xmlBufferAllocationScheme'/>
+    <enum name='XML_BUFFER_ALLOC_IMMUTABLE' file='tree' value='3' type='xmlBufferAllocationScheme'/>
     <enum name='XML_CATA_ALLOW_ALL' file='catalog' value='3' type='xmlCatalogAllow'/>
     <enum name='XML_CATA_ALLOW_DOCUMENT' file='catalog' value='2' type='xmlCatalogAllow'/>
     <enum name='XML_CATA_ALLOW_GLOBAL' file='catalog' value='1' type='xmlCatalogAllow'/>
@@ -2742,6 +2758,7 @@
     <enum name='XML_ERR_CHARREF_IN_PROLOG' file='xmlerror' value='11' type='xmlParserErrors'/>
     <enum name='XML_ERR_COMMENT_NOT_FINISHED' file='xmlerror' value='45' type='xmlParserErrors' info='45'/>
     <enum name='XML_ERR_CONDSEC_INVALID' file='xmlerror' value='83' type='xmlParserErrors' info='84'/>
+    <enum name='XML_ERR_CONDSEC_INVALID_KEYWORD' file='xmlerror' value='99' type='xmlParserErrors'/>
     <enum name='XML_ERR_CONDSEC_NOT_FINISHED' file='xmlerror' value='59' type='xmlParserErrors'/>
     <enum name='XML_ERR_CONDSEC_NOT_STARTED' file='xmlerror' value='58' type='xmlParserErrors' info='59'/>
     <enum name='XML_ERR_DOCTYPE_NOT_FINISHED' file='xmlerror' value='61' type='xmlParserErrors' info='62'/>
@@ -2791,7 +2808,7 @@
     <enum name='XML_ERR_NOTATION_NOT_FINISHED' file='xmlerror' value='49' type='xmlParserErrors'/>
     <enum name='XML_ERR_NOTATION_NOT_STARTED' file='xmlerror' value='48' type='xmlParserErrors' info='49'/>
     <enum name='XML_ERR_NOT_WELL_BALANCED' file='xmlerror' value='85' type='xmlParserErrors' info='86'/>
-    <enum name='XML_ERR_NO_DTD' file='xmlerror' value='94' type='xmlParserErrors' info=' 94'/>
+    <enum name='XML_ERR_NO_DTD' file='xmlerror' value='94' type='xmlParserErrors' info='94'/>
     <enum name='XML_ERR_NO_MEMORY' file='xmlerror' value='2' type='xmlParserErrors'/>
     <enum name='XML_ERR_NS_DECL_ERROR' file='xmlerror' value='35' type='xmlParserErrors'/>
     <enum name='XML_ERR_OK' file='xmlerror' value='0' type='xmlParserErrors'/>
@@ -2820,6 +2837,7 @@
     <enum name='XML_ERR_URI_FRAGMENT' file='xmlerror' value='92' type='xmlParserErrors' info='92'/>
     <enum name='XML_ERR_URI_REQUIRED' file='xmlerror' value='70' type='xmlParserErrors'/>
     <enum name='XML_ERR_VALUE_REQUIRED' file='xmlerror' value='84' type='xmlParserErrors' info='85'/>
+    <enum name='XML_ERR_VERSION_MISSING' file='xmlerror' value='100' type='xmlParserErrors'/>
     <enum name='XML_ERR_XMLDECL_NOT_FINISHED' file='xmlerror' value='57' type='xmlParserErrors'/>
     <enum name='XML_ERR_XMLDECL_NOT_STARTED' file='xmlerror' value='56' type='xmlParserErrors' info='57'/>
     <enum name='XML_EXTERNAL_GENERAL_PARSED_ENTITY' file='entities' value='2' type='xmlEntityType'/>
@@ -2831,6 +2849,10 @@
     <enum name='XML_INTERNAL_PREDEFINED_ENTITY' file='entities' value='6' type='xmlEntityType'/>
     <enum name='XML_NAMESPACE_DECL' file='tree' value='18' type='xmlElementType'/>
     <enum name='XML_NOTATION_NODE' file='tree' value='12' type='xmlElementType'/>
+    <enum name='XML_NS_ERR_ATTRIBUTE_REDEFINED' file='xmlerror' value='98' type='xmlParserErrors'/>
+    <enum name='XML_NS_ERR_QNAME' file='xmlerror' value='97' type='xmlParserErrors'/>
+    <enum name='XML_NS_ERR_UNDEFINED_NAMESPACE' file='xmlerror' value='96' type='xmlParserErrors'/>
+    <enum name='XML_NS_ERR_XML_NAMESPACE' file='xmlerror' value='95' type='xmlParserErrors'/>
     <enum name='XML_PARSER_ATTRIBUTE_VALUE' file='parser' value='12' type='xmlParserInputState' info='within an attribute value'/>
     <enum name='XML_PARSER_CDATA_SECTION' file='parser' value='8' type='xmlParserInputState' info='within a CDATA section'/>
     <enum name='XML_PARSER_COMMENT' file='parser' value='5' type='xmlParserInputState' info='within a comment'/>
@@ -3020,12 +3042,10 @@
     <enum name='XPTR_SUB_RESOURCE_ERROR' file='xpath' value='18' type='xmlXPathError'/>
     <enum name='XPTR_SYNTAX_ERROR' file='xpath' value='16' type='xmlXPathError'/>
     <typedef name='docbDocPtr' file='DOCBparser' type='xmlDocPtr'/>
-    <typedef name='docbNodePtr' file='DOCBparser' type='xmlNodePtr'/>
     <typedef name='docbParserCtxt' file='DOCBparser' type='xmlParserCtxt'/>
     <typedef name='docbParserCtxtPtr' file='DOCBparser' type='xmlParserCtxtPtr'/>
     <typedef name='docbParserInput' file='DOCBparser' type='xmlParserInput'/>
     <typedef name='docbParserInputPtr' file='DOCBparser' type='xmlParserInputPtr'/>
-    <typedef name='docbParserNodeInfo' file='DOCBparser' type='xmlParserNodeInfo'/>
     <typedef name='docbSAXHandler' file='DOCBparser' type='xmlSAXHandler'/>
     <typedef name='docbSAXHandlerPtr' file='DOCBparser' type='xmlSAXHandlerPtr'/>
     <typedef name='htmlDocPtr' file='HTMLparser' type='xmlDocPtr'/>
@@ -3435,6 +3455,13 @@
       <field name='pushTab' type='void * *' info=' array of data for push'/>
       <field name='attsDefault' type='xmlHashTablePtr' info=' defaulted attributes if any'/>
       <field name='attsSpecial' type='xmlHashTablePtr' info=' non-CDATA attributes if any'/>
+      <field name='nsWellFormed' type='int' info='* Those fields are needed only for treaming parsing so far
+*'/>
+      <field name='dictNames' type='int' info=' Use dictionary names for the tree'/>
+      <field name='freeElemsNr' type='int' info=' number of freed element nodes'/>
+      <field name='freeElems' type='xmlNodePtr' info=' List of freed element nodes'/>
+      <field name='freeAttrsNr' type='int' info=' number of freed attributes nodes'/>
+      <field name='freeAttrs' type='xmlAttrPtr' info=' List of freed attributes nodes'/>
     </struct>
     <typedef name='xmlParserCtxtPtr' file='tree' type='xmlParserCtxt *'/>
     <typedef name='xmlParserErrors' file='xmlerror' type='enum'/>
@@ -3456,6 +3483,7 @@
       <field name='encoding' type='const xmlChar *' info=' the encoding string for entity'/>
       <field name='version' type='const xmlChar *' info=' the version string for entity'/>
       <field name='standalone' type='int' info=' Was that entity marked standalone'/>
+      <field name='id' type='int' info=' an unique identifier for the entity'/>
     </struct>
     <struct name='xmlParserInputBuffer' file='tree' type='struct _xmlParserInputBuffer'>
       <field name='context' type='void *' info=''/>
@@ -5127,6 +5155,12 @@
       <return type='xmlBufferPtr' info='the new structure.'/>
       <arg name='size' type='size_t' info='initial size of buffer'/>
     </function>
+    <function name='xmlBufferCreateStatic' file='tree'>
+      <info>routine to create an XML buffer from an immutable memory area, The are won&apos;t be modified nor copied, and is expected to be present until the end of the buffer lifetime.</info>
+      <return type='xmlBufferPtr' info='the new structure.'/>
+      <arg name='mem' type='void *' info='the memory area'/>
+      <arg name='size' type='size_t' info='the size in byte'/>
+    </function>
     <function name='xmlBufferDump' file='tree'>
       <info>Dumps an XML buffer to  a FILE *.</info>
       <return type='int' info='the number of #xmlChar written'/>
@@ -5754,6 +5788,19 @@
       <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
       <arg name='len' type='int' info='the length of the name, if -1 it is recomputed'/>
     </function>
+    <function name='xmlDictOwns' file='dict'>
+      <info>check if a string is owned by the disctionary</info>
+      <return type='int' info='1 if true, 0 if false and -1 in case of error -1 in case of error'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='str' type='const xmlChar *' info='the string'/>
+    </function>
+    <function name='xmlDictQLookup' file='dict'>
+      <info>Add the QName @prefix:@name to the hash @dict if not present.</info>
+      <return type='const xmlChar *' info='the internal copy of the QName or NULL in case of internal error'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='prefix' type='const xmlChar *' info='the prefix'/>
+      <arg name='name' type='const xmlChar *' info='the name'/>
+    </function>
     <function name='xmlDictSize' file='dict'>
       <info>Query the number of elements installed in the hash @dict.</info>
       <return type='int' info='the number of elements in the dictionnary or -1 in case of error'/>
@@ -7814,7 +7861,7 @@
       <info>parse the declaration for a Mixed Element content The leading &apos;(&apos; and spaces have been skipped in xmlParseElementContentDecl   [47] children ::= (choice | seq) (&apos;?&apos; | &apos;*&apos; | &apos;+&apos;)?  [48] cp ::= (Name | choice | seq) (&apos;?&apos; | &apos;*&apos; | &apos;+&apos;)?  [49] choice ::= &apos;(&apos; S? cp ( S? &apos;|&apos; S? cp )* S? &apos;)&apos;  [50] seq ::= &apos;(&apos; S? cp ( S? &apos;,&apos; S? cp )* S? &apos;)&apos;  [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).</info>
       <return type='xmlElementContentPtr' info='the tree of xmlElementContentPtr describing the element hierarchy.'/>
       <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
-      <arg name='inputchk' type='xmlParserInputPtr' info='the input used for the current entity, needed for boundary checks'/>
+      <arg name='inputchk' type='int' info='the input used for the current entity, needed for boundary checks'/>
     </function>
     <function name='xmlParseElementContentDecl' file='parserInternals'>
       <info>parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl  [46] contentspec ::= &apos;EMPTY&apos; | &apos;ANY&apos; | Mixed | children</info>
@@ -7832,7 +7879,7 @@
       <info>parse the declaration for a Mixed Element content The leading &apos;(&apos; and spaces have been skipped in xmlParseElementContentDecl  [51] Mixed ::= &apos;(&apos; S? &apos;#PCDATA&apos; (S? &apos;|&apos; S? Name)* S? &apos;)*&apos; | &apos;(&apos; S? &apos;#PCDATA&apos; S? &apos;)&apos;  [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49])  [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.</info>
       <return type='xmlElementContentPtr' info='the list of the xmlElementContentPtr describing the element choices'/>
       <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
-      <arg name='inputchk' type='xmlParserInputPtr' info='the input used for the current entity, needed for boundary checks'/>
+      <arg name='inputchk' type='int' info='the input used for the current entity, needed for boundary checks'/>
     </function>
     <function name='xmlParseEncName' file='parserInternals'>
       <info>parse the XML encoding name  [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | &apos;-&apos;)*</info>
@@ -8106,6 +8153,13 @@
       <arg name='size' type='int' info='the length of the memory block'/>
       <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
     </function>
+    <function name='xmlParserInputBufferCreateStatic' file='xmlIO'>
+      <info>Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap&apos;ed file.</info>
+      <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+      <arg name='mem' type='const char *' info='the memory input'/>
+      <arg name='size' type='int' info='the length of the memory block'/>
+      <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+    </function>
     <function name='xmlParserInputBufferGrow' file='xmlIO'>
       <info>Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode  TODO: one should be able to remove one extra copy by copying directly onto in-&gt;buffer or in-&gt;raw</info>
       <return type='int' info='the number of chars read and stored in the buffer, or -1 in case of error.'/>
@@ -9490,6 +9544,36 @@
       <return type='int' info='0 or -1 in case of error'/>
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
+    <function name='xmlTextReaderConstBaseUri' file='xmlreader'>
+      <info>The base URI of the node.</info>
+      <return type='const xmlChar *' info='the base URI or NULL if not available, the string will be deallocated with the reader'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderConstLocalName' file='xmlreader'>
+      <info>The local name of the node.</info>
+      <return type='const xmlChar *' info='the local name or NULL if not available, the string will be deallocated with the reader.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderConstName' file='xmlreader'>
+      <info>The qualified name of the node, equal to Prefix :LocalName.</info>
+      <return type='const xmlChar *' info='the local name or NULL if not available, the string is deallocated with the reader.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderConstNamespaceUri' file='xmlreader'>
+      <info>The URI defining the namespace associated with the node.</info>
+      <return type='const xmlChar *' info='the namespace URI or NULL if not available, the string will be deallocated with the reader'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderConstPrefix' file='xmlreader'>
+      <info>A shorthand reference to the namespace associated with the node.</info>
+      <return type='const xmlChar *' info='the prefix or NULL if not available, the string is deallocated with the reader.'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+    </function>
+    <function name='xmlTextReaderConstXmlLang' file='xmlreader'>
+      <info></info>
+      <return type='const xmlChar *' info=''/>
+      <arg name='reader' type='xmlTextReaderPtr' info=''/>
+    </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.'/>