added new APIs for creating reader from sources or reusing a reader with a
* xmlreader.c include/libxml/xmlreader.h: added new APIs
for creating reader from sources or reusing a reader with
a new source, like the xmlReadxx and xmlCtxtReadxxx
* win32/libxml2.def.src doc/libxml2-api.xml doc/apibuild.py
doc/Makefile.am: regenerated the APIs
* doc/xml.html: applied a patch from Stefan Kost for namesapce docs
Daniel
diff --git a/doc/namespaces.html b/doc/namespaces.html
index d50f10b..6f15c5f 100644
--- a/doc/namespaces.html
+++ b/doc/namespaces.html
@@ -34,12 +34,21 @@
associated with the element or the attribute, not the prefix string (which is
just a shortcut for the full URI). In libxml, element and attributes have an
<code>ns</code> field pointing to an xmlNs structure detailing the namespace
-prefix and its URI.</p><p>@@Interfaces@@</p><p>@@Examples@@</p><p>Usually people object to using namespaces together with validity checking.
+prefix and its URI.</p><p>@@Interfaces@@</p><pre>
+xmlNodePtr node;
+if(!strncmp(node->name,"mytag",5)
+ && node->ns
+ && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) {
+ ...
+}
+</pre><p>Usually people object to using namespaces together with validity checking.
I will try to make sure that using namespaces won't break validity checking,
so even if you plan to use or currently are using validation I strongly
suggest adding namespaces to your document. A default namespace scheme
<code>xmlns="http://...."</code> should not break validity even on less
flexible parsers. Using namespaces to mix and differentiate content coming
-from multiple DTDs will certainly break current validation schemes. I will
-try to provide ways to do this, but this may not be portable or
-standardized.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
+from multiple DTDs will certainly break current validation schemes.
+To check such documents one needs to use schema-validation, which is supported
+in libxml2 as well. See <a href="http://www.relaxng.org/">relagx-ng</a> and
+<a href="http://www.w3c.org/XML/Schema">w3c-schema</a>.
+</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>