[libxml2] Large batch of typo fixes



commit 2a350ee9b47ad4cf251f94444073785619c31c77
Author: Jared Yanovich <jaredyanovich gmail com>
Date:   Mon Sep 30 17:04:54 2019 +0200

    Large batch of typo fixes
    
    Closes #109.

 ChangeLog                         | 108 +++++++++++-----------
 HTMLparser.c                      |  14 +--
 HTMLtree.c                        |   2 +-
 NEWS                              |  20 ++---
 README.zOS                        |   2 +-
 SAX2.c                            |  20 ++---
 buf.c                             |   8 +-
 c14n.c                            |  12 +--
 catalog.c                         |   2 +-
 check-xinclude-test-suite.py      |   4 +-
 check-xml-test-suite.py           |   6 +-
 configure.ac                      |   2 +-
 debugXML.c                        |   6 +-
 dict.c                            |   4 +-
 doc/README.docs                   |   2 +-
 doc/examples/examples.xml         |   6 +-
 doc/examples/examples.xsl         |   2 +-
 doc/examples/index.html           |   4 +-
 doc/examples/parse1.c             |   2 +-
 doc/examples/parse2.c             |   4 +-
 doc/examples/parse3.c             |   2 +-
 doc/examples/parse4.c             |   2 +-
 doc/examples/reader3.c            |   2 +-
 doc/examples/reader4.c            |   2 +-
 doc/index.py                      |   2 +-
 doc/xml.html                      |  22 ++---
 doc/xmlreader.html                |  12 +--
 enc.h                             |   2 +-
 encoding.c                        |  18 ++--
 entities.c                        |   6 +-
 error.c                           |   2 +-
 example/gjobread.c                |   2 +-
 genChRanges.py                    |   4 +-
 globals.c                         |   6 +-
 include/libxml/c14n.h             |  12 +--
 include/libxml/catalog.h          |   2 +-
 include/libxml/hash.h             |   4 +-
 include/libxml/parser.h           |   8 +-
 include/libxml/parserInternals.h  |   2 +-
 include/libxml/schemasInternals.h |  12 +--
 include/libxml/tree.h             |   2 +-
 include/libxml/xlink.h            |   2 +-
 include/libxml/xmlIO.h            |   4 +-
 include/libxml/xmlerror.h         |   2 +-
 include/libxml/xpath.h            |   2 +-
 include/win32config.h             |   2 +-
 libxml.h                          |   6 +-
 nanohttp.c                        |   4 +-
 parser.c                          |  34 +++----
 parserInternals.c                 |   8 +-
 pattern.c                         |   8 +-
 python/libxml.c                   |   8 +-
 python/types.c                    |   2 +-
 relaxng.c                         |  68 +++++++-------
 result/XInclude/fallback.xml      |   2 +-
 result/XInclude/fallback.xml.rdr  |   2 +-
 result/valid/REC-xml-19980210.xml |   2 +-
 result/valid/xhtml1.xhtml         |   2 +-
 runsuite.c                        |  14 +--
 runtest.c                         |   6 +-
 runxmlconf.c                      |   6 +-
 save.h                            |   2 +-
 schematron.c                      |   8 +-
 test/XInclude/docs/fallback.xml   |   2 +-
 test/relaxng/docbook_0.xml        |   8 +-
 test/relaxng/spec_0.xml           |   2 +-
 test/relaxng/tutor11_1_3.xml      |   2 +-
 test/threads/abc.xml              |   2 +-
 test/threads/acb.xml              |   2 +-
 test/threads/bac.xml              |   2 +-
 test/threads/bca.xml              |   2 +-
 test/threads/cab.xml              |   2 +-
 test/threads/cba.xml              |   2 +-
 test/valid/REC-xml-19980210.xml   |   2 +-
 test/valid/xhtml1.xhtml           |   2 +-
 testapi.c                         |  16 ++--
 testchar.c                        |   4 +-
 testlimits.c                      |   2 +-
 testrecurse.c                     |   2 +-
 threads.c                         |   4 +-
 timsort.h                         |   2 +-
 tree.c                            |  56 ++++++------
 trio.c                            |   4 +-
 trionan.c                         |   2 +-
 uri.c                             |  14 +--
 valid.c                           |   4 +-
 win32/VC10/config.h               |   2 +-
 win32/configure.js                |   2 +-
 win32/wince/wincecompat.c         |   2 +-
 win32/wince/wincecompat.h         |   6 +-
 xinclude.c                        |  14 +--
 xmlIO.c                           |  10 +--
 xmllint.c                         |   2 +-
 xmlmodule.c                       |   4 +-
 xmlreader.c                       |  28 +++---
 xmlregexp.c                       |  64 ++++++-------
 xmlsave.c                         |   8 +-
 xmlschemas.c                      | 184 +++++++++++++++++---------------------
 xmlschemastypes.c                 |   8 +-
 xmlwriter.c                       |   2 +-
 xpath.c                           |  30 +++----
 xpointer.c                        |   4 +-
 xzlib.c                           |   4 +-
 xzlib.h                           |   2 +-
 104 files changed, 524 insertions(+), 542 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 896fbbb6..e31a9d37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -463,7 +463,7 @@ Thu Jul 31 21:49:45 CEST 2008 Daniel Veillard <daniel veillard com>
          allow to make Name and NmToken validations based on the parser
          flags, more specifically the 5th edition of XML or not
        * HTMLparser.c tree.c: small side effects for the previous changes
-       * parser.c SAX2.c valid.c: the bulk of teh changes are here,
+       * parser.c SAX2.c valid.c: the bulk of the changes are here,
          the parser and validation behaviour can be affected, parsing
          flags need to be copied, lot of changes. Also fixing various
          validation problems in the regression tests.
@@ -1328,7 +1328,7 @@ Wed Mar 21 14:23:08 HKT 2007 William Brack <wbrack mmm com hk>
 Tue Mar 20 09:58:13 CET 2007  Daniel Veillard <daniel veillard com>
 
        * nanoftp.c: applied patch from Björn Wiberg to try to fix again
-         the silly __ss_familly problem on various AIXes, should fix #420184
+         the silly __ss_family problem on various AIXes, should fix #420184
 
 Wed Mar 14 20:30:38 HKT 2007 William Brack <wbrack mmm com hk>
 
@@ -1519,7 +1519,7 @@ Tue Oct 17 22:19:02 CEST 2006 Daniel Veillard <daniel veillard com>
 
 Tue Oct 17 22:04:31 CEST 2006 Daniel Veillard <daniel veillard com>
 
-       * HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
+       * HTMLparser.c: fixed the 2 stupid bugs affecting htmlReadDoc() and
          htmlReadIO() this should fix #340322
 
 Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard <daniel veillard com>
@@ -1680,7 +1680,7 @@ Tue Oct 10 10:52:01 CEST 2006 Daniel Veillard <daniel veillard com>
 Tue Oct 10 10:33:43 CEST 2006 Daniel Veillard <daniel veillard com>
 
        * python/libxml.py python/types.c: applied patch from Ross Reedstrom,
-         Brian West and Stefan Anca to add XPointer suport to the Python bindings
+         Brian West and Stefan Anca to add XPointer support to the Python bindings
 
 Fri Sep 29 11:13:59 CEST 2006 Daniel Veillard <daniel veillard com>
 
@@ -2022,7 +2022,7 @@ Tue May 30 11:21:34 CEST 2006 Kasimier Buchcik <libxml2-cvs cazic net>
 
        * xpath.c: Enhanced xmlXPathNodeCollectAndTest() to avoid
          recreation (if possible) of the node-set which is used to
-         collect the nodes in the current axis for the currect context
+         collect the nodes in the current axis for the current context
          node. Especially for "//foo" this will decrease dramatically
          the number of created node-sets, since for each node in the
          result node-set of the evaluation of descendant-or-self::node()
@@ -2056,7 +2056,7 @@ Wed May 24 10:54:25 CEST 2006 Kasimier Buchcik <libxml2-cvs cazic net>
          xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible.
          A flag on the node-set indicating if namespace nodes are in
          the set would help here; this is the 3rd flag which would
-         be usefull with node-sets. The current flags I have in mind:
+         be useful with node-sets. The current flags I have in mind:
          1) Is a node-set already sorted?
             This would allow for rebust and optimizable sorting
             behaviour.
@@ -2112,7 +2112,7 @@ Tue May 16 16:55:13 CEST 2006 Kasimier Buchcik <libxml2-cvs cazic net>
          compilation time (unlike normal XPath, where we can bind
          namespace names to prefixes at execution time).
        * pattern.c: Enhanced to use a string dict for local-names,
-         ns-prefixes and and namespace-names.
+         ns-prefixes and namespace-names.
          Fixed xmlStreamPushInternal() not to use string-pointer
          comparison if a dict is available; this won't work, since
          one does not know it the given strings originate from the
@@ -2269,7 +2269,7 @@ Wed Mar 22 00:14:34 CET 2006 Daniel Veillard <daniel veillard com>
 Fri Mar 10 08:40:55 EST 2006 Daniel Veillard <daniel veillard com>
 
        * c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few
-         warning raised by gcc-4.1 and latests changes
+         warning raised by gcc-4.1 and latest changes
 
 Fri Mar 10 01:34:42 CET 2006 Daniel Veillard <daniel veillard com>
 
@@ -2967,12 +2967,12 @@ Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik <libxml2-cvs cazic net>
          Fixed default/fixed values for attributes (looks like they
          did not work in the last  releases).
          Completed constraints for attribute uses.
-         Seperated attribute derivation from attribute constraints.
+         Separated attribute derivation from attribute constraints.
          Completed constraints for attribute group definitions.
          Disallowing <import>s of schemas in no target namespace if the
          importing schema is a chameleon schema. This contradicts
          the way Saxon, Xerces-J, XSV and IBM's SQC works, but the
-         W3C XML Schema WG, thinks it is correct to dissalow such
+         W3C XML Schema WG, thinks it is correct to disallow such
          imports.
          Added cos-all-limited constraints.
          Restructured reference resolution to model groups and element
@@ -4980,7 +4980,7 @@ Thu Jan 27 13:39:04 CET 2005 Kasimier Buchcik <libxml2-cvs cazic net>
          modules.
          Added machanism to store element information for the
          ancestor-or-self axis; this is needed for identity-constraints
-         and should be helpfull for a future streamable validation.
+         and should be helpful for a future streamable validation.
        * include/libxml/xmlerror.h: Added an error code for
          identity-constraints.
 
@@ -5639,7 +5639,7 @@ Tue Nov  2 15:49:34 CET 2004 Daniel Veillard <daniel veillard com>
          automatic API regression test tool.
        * SAX2.c nanoftp.c parser.c parserInternals.c tree.c xmlIO.c
          xmlstring.c: various API hardeing changes as a result of running
-         teh first set of automatic API regression tests.
+         the first set of automatic API regression tests.
        * test/slashdot16.xml: apparently missing from CVS, commited it
 
 Mon Nov  1 15:54:18 CET 2004 Daniel Veillard <daniel veillard com>
@@ -5729,7 +5729,7 @@ Fri Oct 22 15:20:23 CEST 2004 Daniel Veillard <daniel veillard com>
 
 Fri Oct 22 21:04:20 CEST 2004 Daniel Veillard <daniel veillard com>
 
-       * python/libxml.c: fixed a problem occuring only in x86_64 when
+       * python/libxml.c: fixed a problem occurring only in x86_64 when
          very large error messages are raised to the Python handlers.
 
 Thu Oct 21 18:03:21 CEST 2004 Daniel Veillard <daniel veillard com>
@@ -5908,7 +5908,7 @@ Fri Sep 24 16:14:12 CEST 2004 Daniel Veillard <daniel veillard com>
 
 Thu Sep 23 18:23:46 CEST 2004 Daniel Veillard <daniel veillard com>
 
-       * xmlschemastypes.c: fixing an out of bound adressing issue
+       * xmlschemastypes.c: fixing an out of bound addressing issue
 
 Thu Sep 23 15:14:12 CEST 2004 Daniel Veillard <daniel veillard com>
 
@@ -6069,7 +6069,7 @@ Fri Sep  3 20:29:59 CEST 2004 Kasimier Buchcik <libxml2-cvs cazic net>
          of the wildcard.
          Added a check for circular attribute group references.
          Added a check for circular model group definition references.
-         Fixed a dublicate xmlParserErrors enum value - see bug #151738.
+         Fixed a duplicate xmlParserErrors enum value - see bug #151738.
 
 Fri Sep  3 10:08:13 PDT 2004 William Brack <wbrack mmmm com hk>
 
@@ -6275,7 +6275,7 @@ Mon Aug 16 02:42:30 CEST 2004 Daniel Veillard <daniel veillard com>
          include/libxml/xmlerror.h: cleanup to avoid 'error' identifier 
          in includes #137414
        * parser.c SAX2.c debugXML.c include/libxml/parser.h:
-         first version of the inplementation of parsing within
+         first version of the implementation of parsing within
          the context of a node in the tree #142359, new function
          xmlParseInNodeContext(), added support at the xmllint --shell
          level as the "set" function
@@ -6938,7 +6938,7 @@ Sun May  9 20:40:59 CEST 2004 Daniel Veillard <daniel veillard com>
 
 Sun May  9 19:46:13 CEST 2004 Daniel Veillard <daniel veillard com>
 
-       * xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
+       * xmlsave.c: apply fix for XHTML1 formatting from Nick Wellnhofer
          fixes bug #141266
        * test/xhtmlcomp result//xhtmlcomp*: added the specific regression
          test
@@ -7753,7 +7753,7 @@ Fri Jan 23 14:03:21 CET 2004 Daniel Veillard <daniel veillard com>
          This is needed for XSLT to keep the stylesheet dictionary read-only
          while being able to reuse the strings for the transformation
          dictionary.
-       * xinclude.c: fixed a dictionary reference counting problem occuring
+       * xinclude.c: fixed a dictionary reference counting problem occurring
          when document parsing failed.
        * testSAX.c: adding option --repeat for timing 100times the parsing
        * doc/* : rebuilt all the docs
@@ -8947,7 +8947,7 @@ Sun Oct 19 00:15:38 HKT 2003 William Brack <wbrack mmm com hk>
        * include/libxml/parserInternals.h HTMLparser.c HTMLtree.c
          SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c
          testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c
-         xpath.c: Changed all (?) occurences where validation macros
+         xpath.c: Changed all (?) occurrences where validation macros
          (IS_xxx) had single-byte arguments to use IS_xxx_CH instead
          (e.g. IS_BLANK changed to IS_BLANK_CH).  This gets rid of
          many warning messages on certain platforms, and also high-
@@ -8972,7 +8972,7 @@ Sat Oct 18 11:04:32 CEST 2003 Daniel Veillard <daniel veillard com>
          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
+       * doc/xml.html: applied a patch from Stefan Kost for namespace docs
 
 Sat Oct 18 12:46:02 HKT 2003 William Brack <wbrack mmm com hk>
 
@@ -9179,7 +9179,7 @@ Tue Oct  7 23:19:39 CEST 2003 Daniel Veillard <daniel veillard com>
          on Windows from Jesse Pelton
        * parser.c: tiny safety patch for xmlStrPrintf() make sure the
          return is always zero terminated. Should also help detecting
-         passing wrong buffer size easilly.
+         passing wrong buffer size easily.
        * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err:
          updated the results to follow the errors string generated by
          last commit.
@@ -9192,7 +9192,7 @@ Tue Oct  7 14:16:45 CEST 2003 Daniel Veillard <daniel veillard com>
 Tue Oct  7 13:30:39 CEST 2003 Daniel Veillard <daniel veillard com>
 
        * error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG
-         module to teh new error reporting. Better default report, adds
+         module to the new error reporting. Better default report, adds
          the element associated if found, context and node are included
          in the xmlError
        * python/tests/reader2.py: the error messages changed.
@@ -10424,7 +10424,7 @@ Fri Jun 13 14:27:19 CEST 2003 Daniel Veillard <daniel veillard com>
 
        * doc/Makefile.am doc/html/*: reverted back patch for #113521,
          due to #115104 and while fixing #115101 . HTML URLs must not
-         be version dependant.
+         be version dependent.
 
 Fri Jun 13 12:03:30 CEST 2003 Daniel Veillard <daniel veillard com>
 
@@ -10627,7 +10627,7 @@ Sat Apr 26 14:00:58 CEST 2003 Daniel Veillard <daniel veillard com>
 
        * python/generator.py: fixed a problem in the generator where
          the way functions are remapped as methods on classes was
-         not symetric and dependant on python internal hash order,
+         not symmetric and dependent on python internal hash order,
          as reported by Stéphane Bidoul
 
 Fri Apr 25 21:52:33 MDT 2003 John Fleck <jfleck inkstain net>
@@ -11162,7 +11162,7 @@ Tue Mar 18 01:28:15 CET 2003 Daniel Veillard <daniel veillard com>
 Mon Mar 17 16:34:07 CET 2003 Daniel Veillard <daniel veillard com>
 
        * relaxng.c: fixed the last core RelaxNG bug known #107083,
-         shemas datatype ID/IDREF support still missing though.
+         schemas datatype ID/IDREF support still missing though.
        * xmlreader.c: fix a crashing bug with prefix raised by
          Merijn Broeren
        * test/relaxng/testsuite.xml: augmented the testsuite with
@@ -11882,7 +11882,7 @@ Fri Jan 10 13:47:55 CET 2003 Daniel Veillard <daniel veillard com>
 
 Fri Jan 10 00:16:49 CET 2003 Daniel Veillard <daniel veillard com>
 
-       * parser.c: one more IsEmptyElement crazyness, that time in
+       * parser.c: one more IsEmptyElement craziness, that time in
          external parsed entities if substitution is asked.
        * python/tests/reader3.py: added a specific test.
 
@@ -12145,7 +12145,7 @@ Wed Dec 25 19:22:06 MST 2002 John Fleck <jfleck inkstain net>
 Mon Dec 23 16:54:22 CET 2002 Daniel Veillard <daniel veillard com>
 
        * xmlreader.c: Fixed the empty node detection to avoid reporting
-         an inexistant close tag.
+         an nonexistent close tag.
 
 Mon Dec 23 15:42:24 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -12482,7 +12482,7 @@ Sat Nov 16 16:30:25 CET 2002 Daniel Veillard <daniel veillard com>
        * parser.c xpath.c: fixing #96925 wich was also dependent on the
          processing of parsed entities, and XPath computation on sustitued
          entities.
-       * testXPath.c: make sure entities are substitued.
+       * testXPath.c: make sure entities are substituted.
 
 Fri Nov 15 16:22:54 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -12673,7 +12673,7 @@ Tue Oct 22 16:23:57 CEST 2002 Daniel Veillard <daniel veillard com>
 Mon Oct 21 09:57:10 CEST 2002 Daniel Veillard <daniel veillard com>
 
        * parser.c: tried to fix bug #91500 where doc->children may
-         be overriden by a call to xmlParseBalancedChunkMemory()
+         be overridden by a call to xmlParseBalancedChunkMemory()
 
 Mon Oct 21 09:04:32 CEST 2002 Daniel Veillard <daniel veillard com>
 
@@ -12800,7 +12800,7 @@ Thu Sep 26 19:48:06 CEST 2002 Daniel Veillard <daniel veillard com>
 
        * configure.in include/libxml/xmlwin32version.h: preparing release
          of 2.4.25
-       * doc/*: updated and regenerated teh docs and web pages.
+       * doc/*: updated and regenerated the docs and web pages.
 
 Thu Sep 26 17:33:46 CEST 2002 Daniel Veillard <daniel veillard com>
 
@@ -13026,7 +13026,7 @@ Thu Sep  5 10:07:13 CEST 2002 Daniel Veillard <daniel veillard com>
 
 Wed Sep  4 14:13:34 CEST 2002 Daniel Veillard <daniel veillard com>
 
-       * libxml.spec.in: fixes libary path for x86_64 AMD
+       * libxml.spec.in: fixes library path for x86_64 AMD
 
 Tue Sep  3 21:14:19 MDT 2002 John Fleck <jfleck inkstain net>
 
@@ -13085,7 +13085,7 @@ Thu Aug 22 16:19:42 CEST 2002 Daniel Veillard <daniel veillard com>
 Thu Aug 22 11:45:50 CEST 2002 Daniel Veillard <daniel veillard com>
 
        * python/Makefile.am: typo in target name resulted in libxml2.py
-         to not be rebuilt. fixed DESTDIR similary to the libxslt one.
+         to not be rebuilt. fixed DESTDIR similarly to the libxslt one.
 
 Thu Aug 22 09:15:00 CEST 2002 Daniel Veillard <daniel veillard com>
 
@@ -14044,7 +14044,7 @@ Thu Mar  7 16:11:35 CET 2002 Daniel Veillard <daniel veillard com>
 Thu Mar  7 12:19:36 CET 2002 Daniel Veillard <daniel veillard com>
 
        * configure.in xmllint.c: trying to fix #71457 for timing
-         precision when gettimeofday() is not availble but ftime() is
+         precision when gettimeofday() is not available but ftime() is
 
 Thu Mar  7 11:24:02 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -14208,7 +14208,7 @@ Tue Feb 19 22:01:35 CET 2002 Daniel Veillard <daniel veillard com>
          when a document is standalone seems correctly handled. There
          is a couple of open issues left which need consideration especially
          PE93 on external unparsed entities and standalone status. 
-         Ran 1819 tests: 1817 suceeded, 2 failed and 0 generated an error in 8.26 s.
+         Ran 1819 tests: 1817 succeeded, 2 failed and 0 generated an error in 8.26 s.
          The 2 tests left failing are actually in error. Cleanup done.
 
 Tue Feb 19 15:17:02 CET 2002 Daniel Veillard <daniel veillard com>
@@ -14225,7 +14225,7 @@ Mon Feb 18 23:25:08 CET 2002 Daniel Veillard <daniel veillard com>
 
        * parser.c valid.c: a couple of errors were reported but not
          saved back as such in the parsing context. Down to 1% failure rate
-         Ran 1819 tests: 1801 suceeded, 18 failed and 0 generated an error
+         Ran 1819 tests: 1801 succeeded, 18 failed and 0 generated an error
 
 Mon Feb 18 20:16:15 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -14266,7 +14266,7 @@ Sun Feb 17 23:45:40 CET 2002 Daniel Veillard <daniel veillard com>
        * check-xml-test-suite.py: improved the behaviour a bit as
          well as the logs
        * parser.c valid.c SAX.c: fixed a few more bugs 
-         "Ran 1819 tests: 1778 suceeded, 41 failed, and 0 generated an error"
+         "Ran 1819 tests: 1778 succeeded, 41 failed, and 0 generated an error"
 
 Sun Feb 17 20:41:37 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -14453,7 +14453,7 @@ Sun Feb  3 17:50:46 CET 2002 Daniel Veillard <daniel veillard com>
          context, allow to switch on and check validity
        * python/tests/Makefile.am python/tests/error.py
          python/tests/invalid.xml python/tests/valid.xml
-         python/tests/validate.py: attded more test and and added error.py
+         python/tests/validate.py: added more test and added error.py
          which I forgot to commit in the last step
 
 Sun Feb  3 16:03:55 CET 2002 Daniel Veillard <daniel veillard com>
@@ -14576,7 +14576,7 @@ Wed Jan 23 18:53:55 CET 2002 Daniel Veillard <daniel veillard com>
 Wed Jan 23 15:14:22 CET 2002 Daniel Veillard <daniel veillard com>
 
        * parserInternals.h: Greg Sjaardema suggested to use an
-         eponential buffer groth policy in xmlParserAddNodeInfo()
+         exponential buffer growth policy in xmlParserAddNodeInfo()
 
 Wed Jan 23 13:32:40 CET 2002 Daniel Veillard <daniel veillard com>
 
@@ -14660,7 +14660,7 @@ Sat Jan 19 16:36:21 CET 2002 Bjorn Reese <breese users sourceforge net>
 
 Fri Jan 18 17:22:50 CET 2002 Daniel Veillard <daniel veillard com>
 
-       * globals.c xmlIO.c xmlcatalog.c: removed the last occurences
+       * globals.c xmlIO.c xmlcatalog.c: removed the last occurrences
          of strdup usage in the code
 
 Fri Jan 18 12:47:15 CET 2002 Daniel Veillard <daniel veillard com>
@@ -15488,7 +15488,7 @@ Wed Sep 12 16:58:16 CEST 2001 Daniel Veillard <daniel veillard com>
 Tue Sep 11 11:25:36 CEST 2001 Daniel Veillard <daniel veillard com>
 
        * parser.c result/noent/wml.xml: fixed bug #59981 related
-         to handling of '&' in attributes when entities are substitued
+         to handling of '&' in attributes when entities are substituted
 
 Mon Sep 10 22:14:42 CEST 2001 Daniel Veillard <daniel veillard com>
 
@@ -16120,7 +16120,7 @@ Tue Jun 26 18:05:26 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
 
        * configure.in doc/xml.html include/libxml/xmlwin32version.h:
          release of 2.3.12
-       * parser.c: make an error message if unknow entities in all cases
+       * parser.c: make an error message if unknown entities in all cases
 
 Tue Jun 26 09:46:29 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
 
@@ -16943,7 +16943,7 @@ Wed Apr 18 17:09:15 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
 Wed Apr 18 15:06:30 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
 
        * debugXML.c hash.c tree.h valid.c : some changes related to
-         the validation suport to improve speed with DocBook
+         the validation support to improve speed with DocBook
        * result/VC/OneID2 result/VC/OneID3 : this slightly changes
          the way validation errors get reported
 
@@ -17003,7 +17003,7 @@ Tue Apr 10 18:13:10 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
        * xpath.c: trying to get 52979 solved
        * tree.c result/ result/noent/: trying to get 52712 solved, this
          also made me clean up the fact that XML output in general should
-         not add formating blanks by default, this changed the output of
+         not add formatting blanks by default, this changed the output of
          a few tests
 
 Tue Apr 10 16:30:20 CEST 2001 Daniel Veillard <Daniel Veillard imag fr>
@@ -17219,7 +17219,7 @@ Wed Mar  7 20:43:47 CET 2001 Daniel Veillard <Daniel Veillard imag fr>
 
        * parser.c SAX.c: the new content parsing code raised an
          ugly bug in the characters() SAX callback. Found it
-         just because of strangeness in XSLT XML Rec ouptut :-(
+         just because of strangeness in XSLT XML Rec output :-(
 
 Wed Mar  7 16:50:22 CET 2001 Daniel Veillard <Daniel Veillard imag fr>
 
@@ -17541,13 +17541,13 @@ Mon Jan 22 16:30:37 CET 2001 Daniel Veillard <Daniel Veillard imag fr>
 
 Mon Jan 22 11:43:21 CET 2001 Daniel Veillard <Daniel Veillard imag fr>
 
-       * xpath.c: when copying a XSLT tree object teh tree need to be copied
+       * xpath.c: when copying a XSLT tree object the tree need to be copied
          too, and deallocation need to occur the same way.
 
 Mon Jan 22 10:35:40 CET 2001 Daniel Veillard <Daniel Veillard imag fr>
 
        * xpathInternals.h xpath.[ch] debugXML.c: added the XPATH_XSLT_TREE
-         type correponding to an XSLT result tree fragment. Share most
+         type corresponding to an XSLT result tree fragment. Share most
          of the data format with node set, as well as operators.
        * HTMLtree.c: added a newline at the end of the doctype output
          whe this one is not present initially.
@@ -17904,7 +17904,7 @@ Sun Oct 15 22:28:32 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
 Sun Oct 15 16:21:27 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
 
        * SAX.c: HTML attributes need normalization too (Bjorn Reese)
-       * HTMLparser.[ch]: addded htmlIsScriptAttribute()
+       * HTMLparser.[ch]: added htmlIsScriptAttribute()
 
 Sun Oct 15 13:18:36 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
 
@@ -18010,7 +18010,7 @@ Wed Oct 11 02:53:10 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
        * include/Makefile.am include/win32config.h: new directory
          for includes
        * win32/Makefile.mingw win32/README.MSDev win32/libxml2/libxml2.dsp
-         updated teh makefiles and instructions for WIN32
+         updated the makefiles and instructions for WIN32
        * xpath.c: small fixes
        * test/XPath/ results/XPath: updated the testcases and results
        * HTMLparser.c nanohttp.c testXPath.c: incorporated provided or
@@ -18255,7 +18255,7 @@ Mon Aug 28 11:58:12 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
          patches from Wayne Davison <wayned users sourceforge net>,
          adding htmlEncodeEntities()
        * HTMLparser.c: fixed an ignorable white space detection bug
-         occuring when parsing with SAX only
+         occurring when parsing with SAX only
        * result/HTML/*.sax: updated since the output is now HTML
          encoded...
 
@@ -18420,7 +18420,7 @@ Fri Jul 14 16:12:20 MEST 2000 Daniel Veillard <Daniel Veillard w3 org>
          when using Sun Pro cc compiler
        * xpath.c : cleanup memleaks
        * nanoftp.c : added a TESTING preprocessor flag for standalong
-         compile so that people can report bugs more easilly
+         compile so that people can report bugs more easily
        * nanohttp.c : ditched socklen_t which was a portability mess
          and replaced it with unsigned int.
        * tree.[ch]: added xmlHasProp()
@@ -18594,7 +18594,7 @@ Mon Apr  3 21:47:10 CEST 2000 Daniel Veillard <Daniel Veillard w3 org>
          Makefile.am : added compile-time customization of libxml
          --with-ftp --with-http --with-html --with-xpath --with-debug
          --with-mem-debug
-       * *.[ch] autoconf.sh : moved to an absolute adressing of includes : 
+       * *.[ch] autoconf.sh : moved to an absolute addressing of includes : 
          #include <libxml/xxx.h> I hope it won't break too much stuff
          and will be manageable in the future...
        * xmllint.c Makefile.am libxml.spec.in : renamed tester.c to xmllint.c
@@ -18625,7 +18625,7 @@ Mon Mar 20 12:33:51 CET 2000 Daniel Veillard <Daniel Veillard w3 org>
          libxml default allocation function with another set (like gmalloc/
          gfree).
        * Makefile.am, uri.c, uri.h: added a set of functions to do
-         exact (litteraly copied from the RFC 2396 productions) parsing
+         exact (literally copied from the RFC 2396 productions) parsing
          and handling of URI. Will be needed for XLink, one XML WFC, 
          XML Base and reused in the nano[ftp/http] modules. Still work
          to be done.
@@ -18688,7 +18688,7 @@ Thu Feb  3 15:59:37 CET 2000 Daniel Veillard <Daniel Veillard w3 org>
 
        * nanoftp.c nanohttp.c tree.c HTMLtree.[ch] debugXML.c xpath.c: Fixed
          compilation warnings on various platforms.
-       * parser.c: Fixed #5281 validity error callbacks are now desactived
+       * parser.c: Fixed #5281 validity error callbacks are now deactivated
          by default if not validating.
 
 Thu Feb  3 13:46:14 CET 2000 Daniel Veillard <Daniel Veillard w3 org>
@@ -19125,7 +19125,7 @@ Wed Sep 22 11:40:31 CEST 1999 Daniel Veillard <Daniel Veillard w3 org>
 
        * parser.h: modified the parser context struct to regain 1.4.0
                    binary compatibility
-       * parser.c, xml-error.h: added errno ot teh context and defined
+       * parser.c, xml-error.h: added errno to the context and defined
                    a set of errors values with update of errno
        * nanohttp.[ch]: minimalist HTTP front-end for fetching remote
                    DTDs and entities
diff --git a/HTMLparser.c b/HTMLparser.c
index 6871f224..1a8133df 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -317,7 +317,7 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
 
 #define SKIP_BLANKS htmlSkipBlankChars(ctxt)
 
-/* Inported from XML */
+/* Imported from XML */
 
 /* #define CUR (ctxt->token ? ctxt->token : (int) (*ctxt->input->cur)) */
 #define CUR ((int) (*ctxt->input->cur))
@@ -537,7 +537,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
 encoding_error:
     /*
      * If we detect an UTF8 error that probably mean that the
-     * input encoding didn't get properly advertized in the
+     * input encoding didn't get properly advertised in the
      * declaration header. Report the error and switch the encoding
      * to ISO-Latin-1 (if you don't like this policy, just declare the
      * encoding !)
@@ -602,8 +602,8 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
  ************************************************************************/
 
 /*
- *  Start Tag: 1 means the start tag can be ommited
- *  End Tag:   1 means the end tag can be ommited
+ *  Start Tag: 1 means the start tag can be omitted
+ *  End Tag:   1 means the end tag can be omitted
  *             2 means it's forbidden (empty elements)
  *             3 means the tag is stylistic and should be closed easily
  *  Depr:      this element is deprecated
@@ -1342,7 +1342,7 @@ htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag)
         if (xmlStrEqual(newtag, ctxt->nameTab[i]))
             break;
         /*
-         * A missplaced endtag can only close elements with lower
+         * A misplaced endtag can only close elements with lower
          * or equal priority, so if we find an element with higher
          * priority before we find an element with
          * matching name, we just ignore this endtag
@@ -2218,9 +2218,9 @@ htmlNewInputStream(htmlParserCtxtPtr ctxt) {
  ************************************************************************/
 /*
  * all tags allowing pc data from the html 4.01 loose dtd
- * NOTE: it might be more apropriate to integrate this information
+ * NOTE: it might be more appropriate to integrate this information
  * into the html40ElementTable array but I don't want to risk any
- * binary incomptibility
+ * binary incompatibility
  */
 static const char *allowPCData[] = {
     "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big",
diff --git a/HTMLtree.c b/HTMLtree.c
index 21cfcfe5..db63b371 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -1048,7 +1048,7 @@ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
  * @cur:  the document
  * @encoding:  the encoding string
  *
- * Dump an HTML document. Formating return/spaces are added.
+ * Dump an HTML document. Formatting return/spaces are added.
  */
 void
 htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
diff --git a/NEWS b/NEWS
index 5504bed8..b55c63b2 100644
--- a/NEWS
+++ b/NEWS
@@ -1398,7 +1398,7 @@ Gansterer),
       on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
       principal node of axis bug, HTML serialization of some codepoint
       (Steven Rainwater), user data propagation in XInclude (Michael Day),
-      standalone and XML decl detection (Michael Day), Python id ouptut
+      standalone and XML decl detection (Michael Day), Python id output
       for some id, fix the big python string memory leak, URI parsing fixes
       (Stéphane Bidoul and William), long comments parsing bug (William),
       concurrent threads initialization (Ted Phelps), invalid char
@@ -1410,7 +1410,7 @@ Gansterer),
       min occurs of 0 (William), HTML script/style parsing (Mike Day)
    - Improvement: make xmlTextReaderSetup() public
    - Compilation and postability: fix a missing include problem (William),
-      __ss_familly on AIX again (Björn Wiberg), compilation without zlib
+      __ss_family on AIX again (Björn Wiberg), compilation without zlib
       (Michael Day), catalog patch for Win32 (Christian Ehrlicher),
       Windows CE fixes (Andreas Stricke)
    - Various CVS to SVN infrastructure changes
@@ -1449,7 +1449,7 @@ Gansterer),
       fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
       crasher, parser safety patch (Ben Darnell), _private context propagation
       when parsing entities (with Michael Day), fix entities behaviour when 
-      using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity
+      using SAX, URI to file path fix (Mikhail Zabaluev), disappearing validity
       context, arg error in SAX callback (Mike Hommey), fix mixed-content
       autodetect when using --noblanks, fix xmlIOParseDTD error handling,
       fix bug in xmlSplitQName on special Names, fix Relax-NG element content
@@ -1533,7 +1533,7 @@ Do not use or package 2.6.25
     split problem (William), issues with non-namespaced attributes in
     xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
     HTML parsing of script, Python must not output to stdout (Nic Ferrier),
-    exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+    exclusive C14N namespace visibility (Aleksey Sanin), XSD datatype
     totalDigits bug (Kasimier Buchcik), error handling when writing to an
     xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
     Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
@@ -1542,7 +1542,7 @@ Do not use or package 2.6.25
     (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
     runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
     (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
-    compilation and build fixes (Michael Day), removed dependancies on
+    compilation and build fixes (Michael Day), removed dependencies on
     xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath
     pattern based evaluation fixes (Kasimier)
    - improvements: XSD Schemas redefinitions/restrictions (Kasimier
@@ -1587,7 +1587,7 @@ Do not use or package 2.6.25
     foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
     Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
     namespace ahndling in Schemas (Kasimier), empty model group in Schemas
-    (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+    (Kasimier), wildcard in Schemas (Kasimier), URI composition (William),
     xs:anyType in Schemas (Kasimier), Python resolver emmitting error
     messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
     fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
@@ -1761,7 +1761,7 @@ Do not use or package 2.6.25
     Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
     transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
     (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
-    handling of failed realloc(), out of bound array adressing in Schemas
+    handling of failed realloc(), out of bound array addressing in Schemas
     date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
     E20 validation fix (Malcolm),
    - improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
@@ -1778,7 +1778,7 @@ Do not use or package 2.6.25
     (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
     and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
     problem (William), Schemas hexbinary empty values, encoding error could
-    genrate a serialization loop.
+    generate a serialization loop.
    - Improvements: Schemas validity improvements (Kasimier), added --path
     and --load-trace options to xmllint
    - documentation: tutorial update (John Fleck)
@@ -1936,7 +1936,7 @@ Do not use or package 2.6.25
     --with-minimum configuration.
    - XInclude: allow the 2001 namespace without warning.
    - Documentation: missing example/index.html (John Fleck), version
-    dependancies (John Fleck)
+    dependencies (John Fleck)
    - reader API: structured error reporting (Steve Ball)
    - Windows compilation: mingw, msys (Mikhail Grushinskiy), function
     prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
@@ -2070,7 +2070,7 @@ Do not use or package 2.6.25
     intercepted at a structured level, with precise information
   available.
    - New simpler and more generic XML and HTML parser APIs, allowing to
-    easilly modify the parsing options and reuse parser context for multiple
+    easily modify the parsing options and reuse parser context for multiple
     consecutive documents.
    - Similar new APIs for the xmlReader, for options and reuse, provided new
     functions to access content as const strings, use them for Python
diff --git a/README.zOS b/README.zOS
index 6b6669ae..e6a6d6e0 100644
--- a/README.zOS
+++ b/README.zOS
@@ -7,7 +7,7 @@ Notes for compiling on zOS:
 
 - since the name of files (or qualifier) in PDS are limited to 8 I had to
   rename xmlschemas.c and xmlschemastypes.c in (resp.) xmlsche.c xmlschet.c
-  (and I had to modify all occurences of these files accordingly in the
+  (and I had to modify all occurrences of these files accordingly in the
   rest of the Makefile !!!).
 
 - in order to copy objects to PDS, I had the cp command at line 860
diff --git a/SAX2.c b/SAX2.c
index fee66b7f..5f141f9a 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -40,7 +40,7 @@
  * TODO:
  *
  * macro to flag unimplemented blocks
- * XML_CATALOG_PREFER user env to select between system/public prefered
+ * XML_CATALOG_PREFER user env to select between system/public preferred
  * option. C.f. Richard Tobin <richard cogsci ed ac uk>
  *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
  *> values "system" and "public".  I have made the default be "system" to
@@ -1512,8 +1512,8 @@ process_external_subset:
        attr = elemDecl->attributes;
        while (attr != NULL) {
            /*
-            * Make sure that attributes redefinition occuring in the
-            * internal subset are not overriden by definitions in the
+            * Make sure that attributes redefinition occurring in the
+            * internal subset are not overridden by definitions in the
             * external subset.
             */
            if (attr->defaultValue != NULL) {
@@ -1736,8 +1736,8 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
     }
 
     /*
-     * set the namespace node, making sure that if the default namspace
-     * is unbound on a parent we simply kee it NULL
+     * set the namespace node, making sure that if the default namespace
+     * is unbound on a parent we simply keep it NULL
      */
     if ((ns != NULL) && (ns->href != NULL) &&
        ((ns->href[0] != 0) || (ns->prefix != NULL)))
@@ -2012,7 +2012,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
        else
            ret->name = xmlStrdup(localname);
 
-        /* link at the end to preserv order, TODO speed up with a last */
+        /* link at the end to preserve order, TODO speed up with a last */
        if (ctxt->node->properties == NULL) {
            ctxt->node->properties = ret;
        } else {
@@ -2104,7 +2104,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
            } else {
                /*
                 * dup now contains a string of the flattened attribute
-                * content with entities substitued. Check if we need to
+                * content with entities substituted. Check if we need to
                 * apply an extra layer of normalization.
                 * It need to be done twice ... it's an extra burden related
                 * to the ability to keep references in attributes
@@ -2137,7 +2137,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
            }
        } else {
            /*
-            * if entities already have been substitued, then
+            * if entities already have been substituted, then
             * the attribute as passed is already normalized
             */
            dup = xmlStrndup(value, valueend - value);
@@ -2400,7 +2400,7 @@ xmlSAX2StartElementNs(void *ctx,
     if (nb_attributes > 0) {
         for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
            /*
-            * Handle the rare case of an undefined atribute prefix
+            * Handle the rare case of an undefined attribute prefix
             */
            if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
                if (ctxt->dictNames) {
@@ -2586,7 +2586,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
             * The whole point of maintaining nodelen and nodemem,
             * xmlTextConcat is too costly, i.e. compute length,
             * reallocate a new buffer, move data, append ch. Here
-            * We try to minimaze realloc() uses and avoid copying
+            * We try to minimize realloc() uses and avoid copying
             * and recomputing length over and over.
             */
            if (lastChild->content == (xmlChar *)&(lastChild->properties)) {
diff --git a/buf.c b/buf.c
index 6a8721bc..d46da365 100644
--- a/buf.c
+++ b/buf.c
@@ -1,7 +1,7 @@
 /*
  * buf.c: memory buffers for libxml2
  *
- * new buffer structures and entry points to simplify the maintainance
+ * new buffer structures and entry points to simplify the maintenance
  * of libxml2 and ensure we keep good control over memory allocations
  * and stay 64 bits clean.
  * The new entry point use the xmlBufPtr opaque structure and
@@ -396,7 +396,7 @@ xmlBufShrink(xmlBufPtr buf, size_t len) {
         ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
        /*
         * we just move the content pointer, but also make sure
-        * the perceived buffer size has shrinked accordingly
+        * the perceived buffer size has shrunk accordingly
         */
         buf->content += len;
        buf->size -= len;
@@ -958,7 +958,7 @@ xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
 
        if (start_buf > (unsigned int) len) {
            /*
-            * We can add it in the space previously shrinked
+            * We can add it in the space previously shrunk
             */
            buf->content -= len;
             memmove(&buf->content[0], str, len);
@@ -1307,7 +1307,7 @@ xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) {
     CHECK_COMPAT(buf)
     base = input->base - buf->content;
     /*
-     * We could do some pointer arythmetic checks but that's probably
+     * We could do some pointer arithmetic checks but that's probably
      * sufficient.
      */
     if (base > buf->size) {
diff --git a/c14n.c b/c14n.c
index d80ae8b7..5b3fbe70 100644
--- a/c14n.c
+++ b/c14n.c
@@ -43,7 +43,7 @@ typedef enum {
 
 typedef struct _xmlC14NVisibleNsStack {
     int nsCurEnd;           /* number of nodes in the set */
-    int nsPrevStart;        /* the begginning of the stack for previous visible node */
+    int nsPrevStart;        /* the beginning of the stack for previous visible node */
     int nsPrevEnd;          /* the end of the stack for previous visible node */
     int nsMax;              /* size of the array as allocated */
     xmlNsPtr   *nsTab;     /* array of ns in no particular order */
@@ -226,7 +226,7 @@ xmlC14NErrRelativeNamespace(const char *ns_uri)
  * xmlC14NErr:
  * @ctxt:  a C14N evaluation context
  * @node:  the context node
- * @error:  the erorr code
+ * @error:  the error code
  * @msg:  the message
  * @extra:  extra informations
  *
@@ -1827,7 +1827,7 @@ xmlC14NNewCtx(xmlDocPtr doc,
     }
 
     /*
-     * Set "mode" flag and remember list of incluseve prefixes
+     * Set "mode" flag and remember list of inclusive prefixes
      * for exclusive c14n
      */
     ctx->mode = mode;
@@ -2039,7 +2039,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
     (void) xmlOutputBufferClose(buf);
 
     if ((*doc_txt_ptr == NULL) && (ret > 0)) {
-        xmlC14NErrMemory("coping canonicanized document");
+        xmlC14NErrMemory("coping canonicalized document");
         return (-1);
     }
     return (ret);
@@ -2057,7 +2057,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
  *                     canonicalization, ignored otherwise)
  * @with_comments:     include comments in the result (!=0) or not (==0)
  * @filename:          the filename to store canonical XML image
- * @compression:       the compression level (zlib requred):
+ * @compression:       the compression level (zlib required):
  *                             -1 - libxml default,
  *                              0 - uncompressed,
  *                             >0 - compression level
@@ -2100,7 +2100,7 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
     ret = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes,
                            with_comments, buf);
     if (ret < 0) {
-        xmlC14NErrInternal("cannicanize document to buffer");
+        xmlC14NErrInternal("canonize document to buffer");
         (void) xmlOutputBufferClose(buf);
         return (-1);
     }
diff --git a/catalog.c b/catalog.c
index f814121c..7328fd31 100644
--- a/catalog.c
+++ b/catalog.c
@@ -56,7 +56,7 @@
  * TODO:
  *
  * macro to flag unimplemented blocks
- * XML_CATALOG_PREFER user env to select between system/public prefered
+ * XML_CATALOG_PREFER user env to select between system/public preferred
  * option. C.f. Richard Tobin <richard cogsci ed ac uk>
  *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
  *> values "system" and "public".  I have made the default be "system" to
diff --git a/check-xinclude-test-suite.py b/check-xinclude-test-suite.py
index f470011e..416ea218 100755
--- a/check-xinclude-test-suite.py
+++ b/check-xinclude-test-suite.py
@@ -209,7 +209,7 @@ while case != None:
        old_test_failed = test_failed
        old_test_error = test_error
         runTestCases(case)
-       print "   Ran %d tests: %d suceeded, %d failed and %d generated an error" % (
+       print "   Ran %d tests: %d succeeded, %d failed and %d generated an error" % (
               test_nr - old_test_nr, test_succeed - old_test_succeed,
               test_failed - old_test_failed, test_error - old_test_error)
     case = case.next
@@ -217,5 +217,5 @@ while case != None:
 conf.freeDoc()
 log.close()
 
-print "Ran %d tests: %d suceeded, %d failed and %d generated an error in %.2f s." % (
+print "Ran %d tests: %d succeeded, %d failed and %d generated an error in %.2f s." % (
       test_nr, test_succeed, test_failed, test_error, time.time() - start)
diff --git a/check-xml-test-suite.py b/check-xml-test-suite.py
index 2de07b10..399a8db9 100755
--- a/check-xml-test-suite.py
+++ b/check-xml-test-suite.py
@@ -326,7 +326,7 @@ def runTest(test):
        #elif extra == 'both' or extra == 'parameter':
        res = testNotWfEntDtd(URI, id)
        #else:
-       #    print "Unknow value %s for an ENTITIES test value" % (extra)
+       #    print "Unknown value %s for an ENTITIES test value" % (extra)
        #    return -1
     elif type == "error":
        res = testError(URI, id)
@@ -397,7 +397,7 @@ while case != None:
        old_test_failed = test_failed
        old_test_error = test_error
         runTestCases(case)
-       print "   Ran %d tests: %d suceeded, %d failed and %d generated an error" % (
+       print "   Ran %d tests: %d succeeded, %d failed and %d generated an error" % (
               test_nr - old_test_nr, test_succeed - old_test_succeed,
               test_failed - old_test_failed, test_error - old_test_error)
     case = case.next
@@ -405,5 +405,5 @@ while case != None:
 conf.freeDoc()
 log.close()
 
-print "Ran %d tests: %d suceeded, %d failed and %d generated an error in %.2f s." % (
+print "Ran %d tests: %d succeeded, %d failed and %d generated an error in %.2f s." % (
       test_nr, test_succeed, test_failed, test_error, time.time() - start)
diff --git a/configure.ac b/configure.ac
index 7a76b459..92ba25da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,7 +217,7 @@ fi
 AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"])
 
 dnl
-dnl hard dependancies on options
+dnl hard dependencies on options
 dnl
 if test "$with_schemas" = "yes"
 then
diff --git a/debugXML.c b/debugXML.c
index 79bb50d1..d8555558 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -289,7 +289,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
        dict = doc->dict;
        if ((dict == NULL) && (ctxt->nodict == 0)) {
 #if 0
-            /* desactivated right now as it raises too many errors */
+            /* deactivated right now as it raises too many errors */
            if (doc->type == XML_DOCUMENT_NODE)
                xmlDebugErr(ctxt, XML_CHECK_NO_DICT,
                            "Document has no dictionary\n");
@@ -1168,7 +1168,7 @@ xmlCtxtDumpDocHead(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
  * @output:  the FILE * for the output
  * @doc:  the document
  *
- * Dumps debug information cncerning the document, not recursive
+ * Dumps debug information concerning the document, not recursive
  */
 static void
 xmlCtxtDumpDocumentHead(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
@@ -1498,7 +1498,7 @@ xmlDebugDumpNodeList(FILE * output, xmlNodePtr node, int depth)
  * @output:  the FILE * for the output
  * @doc:  the document
  *
- * Dumps debug information cncerning the document, not recursive
+ * Dumps debug information concerning the document, not recursive
  */
 void
 xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc)
diff --git a/dict.c b/dict.c
index 13a7b937..fb0773b6 100644
--- a/dict.c
+++ b/dict.c
@@ -730,7 +730,7 @@ xmlDictGrow(xmlDictPtr dict, size_t size) {
                dict->dict[key].next = entry;
            } else {
                /*
-                * we don't have much ways to alert from herei
+                * we don't have much ways to alert from here
                 * result is losing an entry and unicity guarantee
                 */
                ret = -1;
@@ -1205,7 +1205,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
  * @dict: the dictionary
  * @str: the string
  *
- * check if a string is owned by the disctionary
+ * check if a string is owned by the dictionary
  *
  * Returns 1 if true, 0 if false and -1 in case of error
  * -1 in case of error
diff --git a/doc/README.docs b/doc/README.docs
index 279b3757..ef30e43a 100644
--- a/doc/README.docs
+++ b/doc/README.docs
@@ -16,7 +16,7 @@ The list archive is at:
     http://mail.gnome.org/archives/xml/
 
 All technical answers asked privately will be automatically answered on
-the list and archived for public access unless pricacy is explicitely
+the list and archived for public access unless pricacy is explicitly
 required and justified.
 
 Daniel Veillard
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index d38247b4..cc791ed2 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -50,7 +50,7 @@
   </example>
   <example filename='parse1.c'>
     <synopsis>Parse an XML file to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to 
free the resulting tree</purpose>
+    <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and xmlFreeDoc() to free 
the resulting tree</purpose>
     <usage>parse1 test1.xml</usage>
     <test>parse1 test1.xml</test>
     <author>Daniel Veillard</author>
@@ -96,7 +96,7 @@
   </example>
   <example filename='parse3.c'>
     <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to 
free the resulting tree</purpose>
+    <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and xmlFreeDoc() to free 
the resulting tree</purpose>
     <usage>parse3</usage>
     <test>parse3</test>
     <author>Daniel Veillard</author>
@@ -117,7 +117,7 @@
   </example>
   <example filename='parse4.c'>
     <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
-    <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file 
progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+    <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file 
progressively into a tree and xmlFreeDoc() to free the resulting tree</purpose>
     <usage>parse4 test3.xml</usage>
     <test>parse4 test3.xml</test>
     <author>Daniel Veillard</author>
diff --git a/doc/examples/examples.xsl b/doc/examples/examples.xsl
index 74aaaa20..bc93a3d7 100644
--- a/doc/examples/examples.xsl
+++ b/doc/examples/examples.xsl
@@ -99,7 +99,7 @@
       <xsl:apply-templates select='.'/>
     </xsl:for-each>
     </ul>
-    <p> Getting the compilation options and libraries dependancies needed
+    <p> Getting the compilation options and libraries dependencies needed
 to generate binaries from the examples is best done on Linux/Unix by using
 the xml2-config script which should have been installed as part of <i>make
 install</i> step or when installing the libxml2 development package:</p>
diff --git a/doc/examples/index.html b/doc/examples/index.html
index c9314a38..819a49ae 100644
--- a/doc/examples/index.html
+++ b/doc/examples/index.html
@@ -8,7 +8,7 @@ H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
 </style><title>Libxml2 set of examples</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 
vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td 
width="120"><a href="http://swpat.ffii.org/";><img src="../epatents.png" alt="Action against software patents" 
/></a></td><td width="180"><a href="http://www.gnome.org/";><img src="../gnome2.png" alt="Gnome2 Logo" 
/></a><a href="http://www.w3.org/Status";><img src="../w3c.png" alt="W3C Logo" /></a><a 
href="http://www.redhat.com/";><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a 
href="http://xmlsoft.org/";><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" 
/></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" 
bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" 
bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Libxml2 set of examples</h2></td></tr></tabl
 e></td><
 /tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" 
align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" 
width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" 
cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" 
cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Examples 
Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" 
enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" 
/><input name="submit" type="submit" value="Search ..." /></form><ul><li><a 
href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../docs.html">Developer 
Menu</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a 
href="#InputOutput">InputOutput Examples</a></li><li><a hre
 f="#Pars
 ing">Parsing Examples</a></li><li><a href="#Tree">Tree Examples</a></li><li><a href="#XPath">XPath 
Examples</a></li><li><a href="#xmlReader">xmlReader Examples</a></li><li><a href="#xmlWriter">xmlWriter 
Examples</a></li><li><a href="../guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table 
width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" 
align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a 
href="http://mail.gnome.org/archives/xml/";>Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/";>XSLT 
libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/";>DOM gdome2</a></li><li><a 
href="http://www.aleksey.com/xmlsec/";>XML-DSig xmlsec</a></li><li><a 
href="ftp://xmlsoft.org/";>FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/";>Windows 
binaries</a></li><li><a href="http://opencsw.org/packages/libxml2";>Solaris binaries</a></li><li><a 
href="http://www.explain.
 com.au/o
 ss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/";>lxml Python 
bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML";>Perl bindings</a></li><li><a 
href="http://libxmlplusplus.sourceforge.net/";>C++ bindings</a></li><li><a 
href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4";>PHP bindings</a></li><li><a 
href="http://sourceforge.net/projects/libxml2-pas/";>Pascal bindings</a></li><li><a 
href="http://libxml.rubyforge.org/";>Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/";>Tcl 
bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2";>Bug 
Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table 
border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" 
cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" 
width="100%"><tr><td bgcolor="#fffacd"><p> The 
 examples
  are stored per section depending on the main focus
-    of the example:</p><ul><li><p><a href="#xmlWriter">xmlWriter</a> :</p><ul><li><a 
href="#testWriter.c">testWriter.c</a>: use various APIs for the xmlWriter</li></ul></li><li><p><a 
href="#InputOutput">InputOutput</a> :</p><ul><li><a href="#io1.c">io1.c</a>: Example of custom 
Input/Output</li><li><a href="#io2.c">io2.c</a>: Output to char buffer</li></ul></li><li><p><a 
href="#Tree">Tree</a> :</p><ul><li><a href="#tree2.c">tree2.c</a>: Creates a tree</li><li><a 
href="#tree1.c">tree1.c</a>: Navigates a tree to print element names</li></ul></li><li><p><a 
href="#XPath">XPath</a> :</p><ul><li><a href="#xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints 
result node set.</li><li><a href="#xpath2.c">xpath2.c</a>: Load a document, locate subelements with XPath, 
modify said elements and save the resulting document.</li></ul></li><li><p><a href="#Parsing">Parsing</a> 
:</p><ul><li><a href="#parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</li><li>
 <a href=
 "#parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free it</li><li><a 
href="#parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free the result</li><li><a 
href="#parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</li></ul></li><li><p><a 
href="#xmlReader">xmlReader</a> :</p><ul><li><a href="#reader2.c">reader2.c</a>: Parse and validate an XML 
file with an xmlReader</li><li><a href="#reader1.c">reader1.c</a>: Parse an XML file with an 
xmlReader</li><li><a href="#reader3.c">reader3.c</a>: Show how to extract subdocuments with 
xmlReader</li><li><a href="#reader4.c">reader4.c</a>: Parse multiple XML files reusing an 
xmlReader</li></ul></li></ul><p> Getting the compilation options and libraries dependancies needed
+    of the example:</p><ul><li><p><a href="#xmlWriter">xmlWriter</a> :</p><ul><li><a 
href="#testWriter.c">testWriter.c</a>: use various APIs for the xmlWriter</li></ul></li><li><p><a 
href="#InputOutput">InputOutput</a> :</p><ul><li><a href="#io1.c">io1.c</a>: Example of custom 
Input/Output</li><li><a href="#io2.c">io2.c</a>: Output to char buffer</li></ul></li><li><p><a 
href="#Tree">Tree</a> :</p><ul><li><a href="#tree2.c">tree2.c</a>: Creates a tree</li><li><a 
href="#tree1.c">tree1.c</a>: Navigates a tree to print element names</li></ul></li><li><p><a 
href="#XPath">XPath</a> :</p><ul><li><a href="#xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints 
result node set.</li><li><a href="#xpath2.c">xpath2.c</a>: Load a document, locate subelements with XPath, 
modify said elements and save the resulting document.</li></ul></li><li><p><a href="#Parsing">Parsing</a> 
:</p><ul><li><a href="#parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</li><li>
 <a href=
 "#parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free it</li><li><a 
href="#parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free the result</li><li><a 
href="#parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</li></ul></li><li><p><a 
href="#xmlReader">xmlReader</a> :</p><ul><li><a href="#reader2.c">reader2.c</a>: Parse and validate an XML 
file with an xmlReader</li><li><a href="#reader1.c">reader1.c</a>: Parse an XML file with an 
xmlReader</li><li><a href="#reader3.c">reader3.c</a>: Show how to extract subdocuments with 
xmlReader</li><li><a href="#reader4.c">reader4.c</a>: Parse multiple XML files reusing an 
xmlReader</li></ul></li></ul><p> Getting the compilation options and libraries dependencies needed
 to generate binaries from the examples is best done on Linux/Unix by using
 the xml2-config script which should have been installed as part of <i>make
-install</i> step or when installing the libxml2 development package:</p><pre>gcc -o example `xml2-config 
--cflags` example.c `xml2-config --libs`</pre><h2><a name="InputOutput" id="InputOutput"></a>InputOutput 
Examples</h2><h3><a name="io1.c" href="io1.c" id="io1.c">io1.c</a>: Example of custom 
Input/Output</h3><p>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is 
used in an XInclude method context to show how dynamic document can be built in a clean 
way.</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xmlIO.html">&lt;libxml/xmlIO.h&gt;</a></li><li><a 
href="../html/libxml-xinclude.html">&lt;libxml/xinclude.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 105: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 117: Macro <a 
href="../html/libxml-xmlversion.html#LIBX
 ML_TEST_
 VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 117: Function <a 
href="../html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> from 
xmlIO.h</li><li> line 124: Function <a href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from 
parser.h</li><li> line 134: Function <a 
href="../html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a> from xinclude.h</li><li> line 
143: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li><li> line 149: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 154: Function 
<a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 158: 
Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>io1</p><p>Author: Daniel Veillard</p><h3><a name="io2.c" href="io2.c" 
id="io2.c">io2.c</a>: Output to char b
 uffer</h
 3><p>Demonstrate the use of xmlDocDumpMemory to output document to a character 
buffer</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 19: Type <a 
href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from tree.h</li><li> line 20: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 27: Function <a 
href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 28: Function <a 
href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 29: Function <a 
href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> from tree.h</li><li> line 30: 
Function <a href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from 
tree.h</li><li> line 36: Function <a 
href="../html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> from 
tree.h</li></ul><p>Usage:</p><p>io2</p><p>Author: J
 ohn Flec
 k</p><h2><a name="Parsing" id="Parsing"></a>Parsing Examples</h2><h3><a name="parse3.c" href="parse3.c" 
id="parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</h3><p>Demonstrate the use 
of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting 
tree</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 27: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 33: Function <a 
href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from parser.h</li><li> line 38: Function <a 
href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 49: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 54: Function <a href="../html/libxml-parser.html#x
 mlCleanu
 pParser">xmlCleanupParser</a> from parser.h</li><li> line 58: Function <a 
href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>parse3</p><p>Author: Daniel Veillard</p><h3><a name="parse4.c" 
href="parse4.c" id="parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free 
it</h3><p>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file 
progressively into a tree and and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 45: Type <a 
href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 47: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 67: Function <a 
href="../html/libxml-parser.html#xmlCreatePushParserCt
 xt">xmlC
 reatePushParserCtxt</a> from parser.h</li><li> line 86: Function <a 
href="../html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a> from parser.h</li><li> line 94: Function <a 
href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from parser.h</li><li> line 103: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 120: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 131: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from 
parser.h</li><li> line 135: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> 
from xmlmemory.h</li></ul><p>Usage:</p><p>parse4 test3.xml</p><p>Author: Daniel Veillard</p><h3><a 
name="parse2.c" href="parse2.c" id="parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free 
the result</h3><p>Create a parser context for an XML file, then pars
 e and va
 lidate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting 
tree.</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 25: Type <a 
href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 29: Function 
<a href="../html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a> from parser.h</li><li> line 35: 
Function <a href="../html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a> from parser.h</li><li> line 
47: Function <a href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from 
parser.h</li></ul><p>Usage:</p><p>parse2 test2.xml</p><p>Author: Daniel Veillard</p><h3><a name="parse1.c" 
href="parse1.c" id="parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</h3><p>Demonstrate the 
use of xmlReadFile() to read an XML fil
 e into a
  tree and and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: Function 
<a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from 
parser.h</li></ul><p>Usage:</p><p>parse1 test1.xml</p><p>Author: Daniel Veillard</p><h2><a name="Tree" 
id="Tree"></a>Tree Examples</h2><h3><a name="tree2.c" href="tree2.c" id="tree2.c">tree2.c</a>: Creates a 
tree</h3><p>Shows how to create document, nodes and dump it to stdout or file.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 34: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 39: Function <a href="../html/libxml-tree.html
 #xmlNewD
 oc">xmlNewDoc</a> from tree.h</li><li> line 41: Function <a 
href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 46: 
Function <a href="../html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a> from tree.h</li><li> 
line 74: Function <a href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 75: 
Function <a href="../html/libxml-tree.html#xmlNewText">xmlNewText</a> from tree.h</li><li> line 78: Function 
<a href="../html/libxml-tree.html#xmlAddChild">xmlAddChild</a> from tree.h</li><li> line 88: Function <a 
href="../html/libxml-tree.html#xmlNewChild">xmlNewChild</a> from tree.h</li><li> line 89: Function <a 
href="../html/libxml-tree.html#xmlNewProp">xmlNewProp</a> from tree.h</li><li> line 96: Function <a 
href="../html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> from tree.h</li><li> line 99: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h
 </li><li
line 105: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from 
parser.h</li><li> line 110: Function <a 
href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>tree2 &lt;filename&gt;  -Default output: stdout</p><p>Author: Lucas 
Brasilino &lt;brasilino recife pe gov br&gt;</p><h3><a name="tree1.c" href="tree1.c" 
id="tree1.c">tree1.c</a>: Navigates a tree to print element names</h3><p>Parse a file to a tree, use 
xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in 
document order.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 67: 
Function <a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from parser.h</li><li> line 74: 
Function <a href="../html/libxml-tree.html#xmlDocGetRoot
 Element"
xmlDocGetRootElement</a> from tree.h</li></ul><p>Usage:</p><p>tree1 filename_or_URL</p><p>Author: Dodji 
Seketeli</p><h2><a name="XPath" id="XPath"></a>XPath Examples</h2><h3><a name="xpath1.c" href="xpath1.c" 
id="xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints result node set.</h3><p>Shows how to 
evaluate XPath expression and register known namespaces in XPath context.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a 
href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 39: Function 
<a href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 43: Macro 
<a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from 
xmlversion.h</li><li> line 49: Functi
 on <a hr
 ef="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 54: 
Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li><li> 
line 86: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type 
<a href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: 
Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 
94: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> from parser.h</li><li> line 
101: Function <a href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from 
xpath.h</li><li> line 117: Function <a 
href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from xpath.h</li><li> line 
129: Function <a href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from xpat
 h.h</li>
 <li> line 130: Function <a href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from 
xpath.h</li><li> line 131: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from 
tree.h</li><li> line 156: Function <a href="../html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a> from 
xmlstring.h</li><li> line 180: Function <a href="../html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a> from 
xmlstring.h</li><li> line 186: Function <a 
href="../html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a> from 
xpathInternals.h</li><li> line 206: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from 
tree.h</li><li> line 218: Type <a href="../html/libxml-tree.html#xmlNsPtr">xmlNsPtr</a> from 
tree.h</li></ul><p>Usage:</p><p>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; 
[&lt;known-ns-list&gt;]</p><p>Author: Aleksey Sanin</p><h3><a name="xpath2.c" href="xpath2.c" 
id="xpath2.c">xpath2.c</a>: Load a document, locate subelements 
 with XPa
 th, modify said elements and save the resulting document.</h3><p>Shows how to make a full round-trip from a 
load/edit/save</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a 
href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 41: Function <a 
href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 86: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type <a 
href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: 
Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 
95: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> 
 from par
 ser.h</li><li> line 102: Function <a 
href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from xpath.h</li><li> line 110: 
Function <a href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from 
xpath.h</li><li> line 123: Function <a 
href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from xpath.h</li><li> line 124: 
Function <a href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from 
xpath.h</li><li> line 127: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from 
tree.h</li><li> line 131: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from 
tree.h</li><li> line 162: Function <a href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> 
from tree.h</li></ul><p>Usage:</p><p>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; 
&lt;new-value&gt;</p><p>Author: Aleksey Sanin and Daniel Veillard</p><h2><a name="xmlReader" 
id="xmlReader"></a>
 xmlReade
 r Examples</h2><h3><a name="reader2.c" href="reader2.c" id="reader2.c">reader2.c</a>: Parse and validate an 
XML file with an xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file validating 
the content in the process and activating options like entities substitution, and DTD attributes defaulting. 
(Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 30: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a> from 
xmlreader.h</li><li> line 34: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from 
xmlreader.h</li><li> line 37: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 
38: Function <a href="../html/libxml-xmlreader.html#xmlText
 ReaderNo
 deType">xmlTextReaderNodeType</a> from xmlreader.h</li><li> line 40: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from 
xmlreader.h</li><li> line 41: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from 
xmlreader.h</li><li> line 45: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from 
xmlstring.h</li><li> line 60: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 68: 
Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from 
xmlreader.h</li><li> line 76: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 
81: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a> from 
xmlreader.h</li><li> line 84: Function <a href="../html/libxml-xmlreader
 .html#xm
 lFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li><li> line 104: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 109: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from 
parser.h</li><li> line 113: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> 
from xmlmemory.h</li></ul><p>Usage:</p><p>reader2 &lt;valid_xml_filename&gt;</p><p>Author: Daniel 
Veillard</p><h3><a name="reader1.c" href="reader1.c" id="reader1.c">reader1.c</a>: Parse an XML file with an 
xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations 
about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 
2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 29: 
Function <a href="../htm
 l/libxml
 -xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a> from xmlreader.h</li><li> line 33: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from 
xmlreader.h</li><li> line 36: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 
37: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a> from 
xmlreader.h</li><li> line 39: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from 
xmlreader.h</li><li> line 40: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from 
xmlreader.h</li><li> line 44: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from 
xmlstring.h</li><li> line 59: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> 
 line 62:
  Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from 
xmlreader.h</li><li> line 67: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 
69: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from 
xmlreader.h</li></ul><p>Usage:</p><p>reader1 &lt;filename&gt;</p><p>Author: Daniel Veillard</p><h3><a 
name="reader3.c" href="reader3.c" id="reader3.c">reader3.c</a>: Show how to extract subdocuments with 
xmlReader</h3><p>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the 
xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require 
libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 32: 
Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTe
 xtReader
 Ptr</a> from xmlreader.h</li><li> line 38: Function <a 
href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 43: 
Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a> from 
xmlreader.h</li><li> line 52: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 
62: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from 
xmlreader.h</li><li> line 66: Function <a 
href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li><li> line 
96: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from 
tree.h</li></ul><p>Usage:</p><p>reader3</p><p>Author: Daniel Veillard</p><h3><a name="reader4.c" 
href="reader4.c" id="reader4.c">reader4.c</a>: Parse multiple XML files reusing an 
xmlReader</h3><p>Demonstrate the use of
  xmlRead
 erForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context.  
(Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from 
xmlreader.h</li><li> line 54: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 72: 
Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from 
xmlreader.h</li><li> line 83: Function <a 
href="../html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a> from xmlreader.h</li><li> line 97: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from 
xmlreader.h</li><li> line 104: Function <a href="../html/libxml-xmlreader.html#
 xmlFreeT
 extReader">xmlFreeTextReader</a> from xmlreader.h</li></ul><p>Usage:</p><p>reader4 &lt;filename&gt; [ 
filename ... ]</p><p>Author: Graham Bennett</p><h2><a name="xmlWriter" id="xmlWriter"></a>xmlWriter 
Examples</h2><h3><a name="testWriter.c" href="testWriter.c" id="testWriter.c">testWriter.c</a>: use various 
APIs for the xmlWriter</h3><p>tests a number of APIs for the xmlWriter, especially the various methods to 
write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding 
string conversions too. The resulting documents are then serialized.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-encoding.html">&lt;libxml/encoding.h&gt;</a></li><li><a 
href="../html/libxml-xmlwriter.html">&lt;libxml/xmlwriter.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 76: 
Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a> from 
xmlwriter.h</li><li> line 341: Type <a href="../html/libxml-tree.html#xmlBuff
 erPtr">x
 mlBufferPtr</a> from tree.h</li><li> line 347: Function <a 
href="../html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a> from tree.h</li><li> line 355: Function 
<a href="../html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a> from 
xmlwriter.h</li><li> line 613: Function <a href="../html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a> 
from tree.h</li><li> line 632: Function <a 
href="../html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a> from xmlwriter.h</li><li> 
line 878: Type <a href="../html/libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> from 
xmlwriter.h</li><li> line 880: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from 
tree.h</li><li> line 885: Macro <a 
href="../html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a> from parser.h</li><li> line 
885: Function <a href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 894: 
Function <a href="../html
 /libxml-
 tree.html#xmlNewDocNode">xmlNewDocNode</a> from tree.h</li><li> line 901: Function <a 
href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 904: 
Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a> from 
xmlwriter.h</li><li> line 913: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a> from 
xmlwriter.h</li><li> line 925: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a> from 
xmlwriter.h</li><li> line 949: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a> from 
xmlwriter.h</li><li> line 959: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a> from 
xmlwriter.h</li><li> line 1073: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement"
xmlText
 WriterWriteFormatElement</a> from xmlwriter.h</li><li> line 1096: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a> from 
xmlwriter.h</li><li> line 1103: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a> from 
xmlwriter.h</li><li> line 1111: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a> from 
xmlwriter.h</li><li> line 1121: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a> from 
xmlwriter.h</li><li> line 1127: Function <a 
href="../html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a> from xmlwriter.h</li><li> line 
1129: Function <a href="../html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a> from tree.h</li><li> line 
1151: Type <a href="../html/libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> 
from encoding.h</li><li> 
 line 115
 6: Function <a href="../html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a> 
from encoding.h</li></ul><p>Usage:</p><p>testWriter</p><p>Author: Alfred Mickautsch</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>
+install</i> step or when installing the libxml2 development package:</p><pre>gcc -o example `xml2-config 
--cflags` example.c `xml2-config --libs`</pre><h2><a name="InputOutput" id="InputOutput"></a>InputOutput 
Examples</h2><h3><a name="io1.c" href="io1.c" id="io1.c">io1.c</a>: Example of custom 
Input/Output</h3><p>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is 
used in an XInclude method context to show how dynamic document can be built in a clean 
way.</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xmlIO.html">&lt;libxml/xmlIO.h&gt;</a></li><li><a 
href="../html/libxml-xinclude.html">&lt;libxml/xinclude.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 105: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 117: Macro <a 
href="../html/libxml-xmlversion.html#LIBX
 ML_TEST_
 VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 117: Function <a 
href="../html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> from 
xmlIO.h</li><li> line 124: Function <a href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from 
parser.h</li><li> line 134: Function <a 
href="../html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a> from xinclude.h</li><li> line 
143: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li><li> line 149: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 154: Function 
<a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 158: 
Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>io1</p><p>Author: Daniel Veillard</p><h3><a name="io2.c" href="io2.c" 
id="io2.c">io2.c</a>: Output to char b
 uffer</h
 3><p>Demonstrate the use of xmlDocDumpMemory to output document to a character 
buffer</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 19: Type <a 
href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from tree.h</li><li> line 20: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 27: Function <a 
href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 28: Function <a 
href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 29: Function <a 
href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> from tree.h</li><li> line 30: 
Function <a href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from 
tree.h</li><li> line 36: Function <a 
href="../html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> from 
tree.h</li></ul><p>Usage:</p><p>io2</p><p>Author: J
 ohn Flec
 k</p><h2><a name="Parsing" id="Parsing"></a>Parsing Examples</h2><h3><a name="parse3.c" href="parse3.c" 
id="parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</h3><p>Demonstrate the use 
of xmlReadMemory() to read an XML file into a tree and xmlFreeDoc() to free the resulting 
tree</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 27: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 33: Function <a 
href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from parser.h</li><li> line 38: Function <a 
href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 49: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 54: Function <a href="../html/libxml-parser.html#xmlCl
 eanupPar
 ser">xmlCleanupParser</a> from parser.h</li><li> line 58: Function <a 
href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>parse3</p><p>Author: Daniel Veillard</p><h3><a name="parse4.c" 
href="parse4.c" id="parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free 
it</h3><p>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file 
progressively into a tree and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 45: Type <a 
href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 47: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 67: Function <a 
href="../html/libxml-parser.html#xmlCreatePushParserCtxt">xmlC
 reatePus
 hParserCtxt</a> from parser.h</li><li> line 86: Function <a 
href="../html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a> from parser.h</li><li> line 94: Function <a 
href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from parser.h</li><li> line 103: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 120: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 131: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from 
parser.h</li><li> line 135: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> 
from xmlmemory.h</li></ul><p>Usage:</p><p>parse4 test3.xml</p><p>Author: Daniel Veillard</p><h3><a 
name="parse2.c" href="parse2.c" id="parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free 
the result</h3><p>Create a parser context for an XML file, then parse and va
 lidate t
 he file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting 
tree.</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 25: Type <a 
href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 29: Function 
<a href="../html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a> from parser.h</li><li> line 35: 
Function <a href="../html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a> from parser.h</li><li> line 
47: Function <a href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from 
parser.h</li></ul><p>Usage:</p><p>parse2 test2.xml</p><p>Author: Daniel Veillard</p><h3><a name="parse1.c" 
href="parse1.c" id="parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</h3><p>Demonstrate the 
use of xmlReadFile() to read an XML file into a
  tree an
 d xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: Function 
<a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from 
parser.h</li></ul><p>Usage:</p><p>parse1 test1.xml</p><p>Author: Daniel Veillard</p><h2><a name="Tree" 
id="Tree"></a>Tree Examples</h2><h3><a name="tree2.c" href="tree2.c" id="tree2.c">tree2.c</a>: Creates a 
tree</h3><p>Shows how to create document, nodes and dump it to stdout or file.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 34: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 39: Function <a href="../html/libxml-tree.html#xmlNewDoc">
 xmlNewDo
 c</a> from tree.h</li><li> line 41: Function <a 
href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 46: 
Function <a href="../html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a> from tree.h</li><li> 
line 74: Function <a href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 75: 
Function <a href="../html/libxml-tree.html#xmlNewText">xmlNewText</a> from tree.h</li><li> line 78: Function 
<a href="../html/libxml-tree.html#xmlAddChild">xmlAddChild</a> from tree.h</li><li> line 88: Function <a 
href="../html/libxml-tree.html#xmlNewChild">xmlNewChild</a> from tree.h</li><li> line 89: Function <a 
href="../html/libxml-tree.html#xmlNewProp">xmlNewProp</a> from tree.h</li><li> line 96: Function <a 
href="../html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> from tree.h</li><li> line 99: 
Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> li
 ne 105: 
 Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> 
line 110: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from 
xmlmemory.h</li></ul><p>Usage:</p><p>tree2 &lt;filename&gt;  -Default output: stdout</p><p>Author: Lucas 
Brasilino &lt;brasilino recife pe gov br&gt;</p><h3><a name="tree1.c" href="tree1.c" 
id="tree1.c">tree1.c</a>: Navigates a tree to print element names</h3><p>Parse a file to a tree, use 
xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in 
document order.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 67: Function 
<a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from parser.h</li><li> line 74: Function <a 
href="../html/libxml-tree.html#xmlDocGetRootElement">xml
 DocGetRo
 otElement</a> from tree.h</li></ul><p>Usage:</p><p>tree1 filename_or_URL</p><p>Author: Dodji 
Seketeli</p><h2><a name="XPath" id="XPath"></a>XPath Examples</h2><h3><a name="xpath1.c" href="xpath1.c" 
id="xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints result node set.</h3><p>Shows how to 
evaluate XPath expression and register known namespaces in XPath context.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a 
href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 39: Function <a 
href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 43: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 49: Function <a href="
 ../html/
 libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 54: Function <a 
href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li><li> line 86: Type 
<a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type <a 
href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: 
Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 
94: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> from parser.h</li><li> line 
101: Function <a href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from 
xpath.h</li><li> line 117: Function <a 
href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from xpath.h</li><li> line 
129: Function <a href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from 
xpath.h</li><li>
  line 13
 0: Function <a href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from 
xpath.h</li><li> line 131: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from 
tree.h</li><li> line 156: Function <a href="../html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a> from 
xmlstring.h</li><li> line 180: Function <a href="../html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a> from 
xmlstring.h</li><li> line 186: Function <a 
href="../html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a> from 
xpathInternals.h</li><li> line 206: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from 
tree.h</li><li> line 218: Type <a href="../html/libxml-tree.html#xmlNsPtr">xmlNsPtr</a> from 
tree.h</li></ul><p>Usage:</p><p>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; 
[&lt;known-ns-list&gt;]</p><p>Author: Aleksey Sanin</p><h3><a name="xpath2.c" href="xpath2.c" 
id="xpath2.c">xpath2.c</a>: Load a document, locate subelements with XPath, 
 modify s
 aid elements and save the resulting document.</h3><p>Shows how to make a full round-trip from a 
load/edit/save</p><p>Includes:</p><ul><li><a 
href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a 
href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a 
href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a 
href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 41: Function <a 
href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 86: Type <a 
href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type <a 
href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: 
Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 
95: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> from parser.
 h</li><l
 i> line 102: Function <a href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from 
xpath.h</li><li> line 110: Function <a 
href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from xpath.h</li><li> line 
123: Function <a href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from 
xpath.h</li><li> line 124: Function <a 
href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from xpath.h</li><li> line 127: 
Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li><li> line 131: Function 
<a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 162: Function <a 
href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> from 
tree.h</li></ul><p>Usage:</p><p>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</p><p>Author: 
Aleksey Sanin and Daniel Veillard</p><h2><a name="xmlReader" id="xmlReader"></a>xmlReader Ex
 amples</
 h2><h3><a name="reader2.c" href="reader2.c" id="reader2.c">reader2.c</a>: Parse and validate an XML file 
with an xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file validating the 
content in the process and activating options like entities substitution, and DTD attributes defaulting. 
(Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 30: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a> from 
xmlreader.h</li><li> line 34: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from 
xmlreader.h</li><li> line 37: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 
38: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderNodeTy
 pe">xmlT
 extReaderNodeType</a> from xmlreader.h</li><li> line 40: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from 
xmlreader.h</li><li> line 41: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from 
xmlreader.h</li><li> line 45: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from 
xmlstring.h</li><li> line 60: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 68: 
Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from 
xmlreader.h</li><li> line 76: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 
81: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a> from 
xmlreader.h</li><li> line 84: Function <a href="../html/libxml-xmlreader.html#xmlFre
 eTextRea
 der">xmlFreeTextReader</a> from xmlreader.h</li><li> line 104: Macro <a 
href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> 
line 109: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from 
parser.h</li><li> line 113: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> 
from xmlmemory.h</li></ul><p>Usage:</p><p>reader2 &lt;valid_xml_filename&gt;</p><p>Author: Daniel 
Veillard</p><h3><a name="reader1.c" href="reader1.c" id="reader1.c">reader1.c</a>: Parse an XML file with an 
xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations 
about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 
2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 29: 
Function <a href="../html/libxml-xml
 reader.h
 tml#xmlTextReaderConstName">xmlTextReaderConstName</a> from xmlreader.h</li><li> line 33: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from 
xmlreader.h</li><li> line 36: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 
37: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a> from 
xmlreader.h</li><li> line 39: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from 
xmlreader.h</li><li> line 40: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from 
xmlreader.h</li><li> line 44: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from 
xmlstring.h</li><li> line 59: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 62: 
Fun
 ction <a
  href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 
67: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from 
xmlreader.h</li><li> line 69: Function <a 
href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from 
xmlreader.h</li></ul><p>Usage:</p><p>reader1 &lt;filename&gt;</p><p>Author: Daniel Veillard</p><h3><a 
name="reader3.c" href="reader3.c" id="reader3.c">reader3.c</a>: Show how to extract subdocuments with 
xmlReader</h3><p>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the 
xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require 
libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 32: 
Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr<
 /a> from
  xmlreader.h</li><li> line 38: Function <a 
href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 43: 
Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a> from 
xmlreader.h</li><li> line 52: Function <a 
href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 
62: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from 
xmlreader.h</li><li> line 66: Function <a 
href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li><li> line 
96: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from 
tree.h</li></ul><p>Usage:</p><p>reader3</p><p>Author: Daniel Veillard</p><h3><a name="reader4.c" 
href="reader4.c" id="reader4.c">reader4.c</a>: Parse multiple XML files reusing an 
xmlReader</h3><p>Demonstrate the use of xmlReaderFo
 rFile() 
 and xmlReaderNewFile to parse XML files while reusing the reader object and parser context.  (Note that the 
XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a 
href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from 
xmlreader.h</li><li> line 54: Type <a 
href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 72: 
Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from 
xmlreader.h</li><li> line 83: Function <a 
href="../html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a> from xmlreader.h</li><li> line 97: 
Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from 
xmlreader.h</li><li> line 104: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextR
 eader">x
 mlFreeTextReader</a> from xmlreader.h</li></ul><p>Usage:</p><p>reader4 &lt;filename&gt; [ filename ... 
]</p><p>Author: Graham Bennett</p><h2><a name="xmlWriter" id="xmlWriter"></a>xmlWriter Examples</h2><h3><a 
name="testWriter.c" href="testWriter.c" id="testWriter.c">testWriter.c</a>: use various APIs for the 
xmlWriter</h3><p>tests a number of APIs for the xmlWriter, especially the various methods to write to a 
filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string 
conversions too. The resulting documents are then serialized.</p><p>Includes:</p><ul><li><a 
href="../html/libxml-encoding.html">&lt;libxml/encoding.h&gt;</a></li><li><a 
href="../html/libxml-xmlwriter.html">&lt;libxml/xmlwriter.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 76: 
Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a> from 
xmlwriter.h</li><li> line 341: Type <a href="../html/libxml-tree.html#xmlBufferPtr">xmlBu
 fferPtr<
 /a> from tree.h</li><li> line 347: Function <a 
href="../html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a> from tree.h</li><li> line 355: Function 
<a href="../html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a> from 
xmlwriter.h</li><li> line 613: Function <a href="../html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a> 
from tree.h</li><li> line 632: Function <a 
href="../html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a> from xmlwriter.h</li><li> 
line 878: Type <a href="../html/libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> from 
xmlwriter.h</li><li> line 880: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from 
tree.h</li><li> line 885: Macro <a 
href="../html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a> from parser.h</li><li> line 
885: Function <a href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 894: 
Function <a href="../html/libxml-tree
 .html#xm
 lNewDocNode">xmlNewDocNode</a> from tree.h</li><li> line 901: Function <a 
href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 904: 
Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a> from 
xmlwriter.h</li><li> line 913: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a> from 
xmlwriter.h</li><li> line 925: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a> from 
xmlwriter.h</li><li> line 949: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a> from 
xmlwriter.h</li><li> line 959: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a> from 
xmlwriter.h</li><li> line 1073: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWrit
 erWriteF
 ormatElement</a> from xmlwriter.h</li><li> line 1096: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a> from 
xmlwriter.h</li><li> line 1103: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a> from 
xmlwriter.h</li><li> line 1111: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a> from 
xmlwriter.h</li><li> line 1121: Function <a 
href="../html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a> from 
xmlwriter.h</li><li> line 1127: Function <a 
href="../html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a> from xmlwriter.h</li><li> line 
1129: Function <a href="../html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a> from tree.h</li><li> line 
1151: Type <a href="../html/libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> 
from encoding.h</li><li> line 1156: F
 unction 
 <a href="../html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a> from 
encoding.h</li></ul><p>Usage:</p><p>testWriter</p><p>Author: Alfred Mickautsch</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>
diff --git a/doc/examples/parse1.c b/doc/examples/parse1.c
index b44b03be..e3c9d3a6 100644
--- a/doc/examples/parse1.c
+++ b/doc/examples/parse1.c
@@ -2,7 +2,7 @@
  * section: Parsing
  * synopsis: Parse an XML file to a tree and free it
  * purpose: Demonstrate the use of xmlReadFile() to read an XML file
- *          into a tree and and xmlFreeDoc() to free the resulting tree
+ *          into a tree and xmlFreeDoc() to free the resulting tree
  * usage: parse1 test1.xml
  * test: parse1 test1.xml
  * author: Daniel Veillard
diff --git a/doc/examples/parse2.c b/doc/examples/parse2.c
index aed76762..4dcbfde9 100644
--- a/doc/examples/parse2.c
+++ b/doc/examples/parse2.c
@@ -33,11 +33,11 @@ exampleFunc(const char *filename) {
     }
     /* parse the file, activating the DTD validation option */
     doc = xmlCtxtReadFile(ctxt, filename, NULL, XML_PARSE_DTDVALID);
-    /* check if parsing suceeded */
+    /* check if parsing succeeded */
     if (doc == NULL) {
         fprintf(stderr, "Failed to parse %s\n", filename);
     } else {
-       /* check if validation suceeded */
+       /* check if validation succeeded */
         if (ctxt->valid == 0)
            fprintf(stderr, "Failed to validate %s\n", filename);
        /* free up the resulting document */
diff --git a/doc/examples/parse3.c b/doc/examples/parse3.c
index a2d3a409..076a786a 100644
--- a/doc/examples/parse3.c
+++ b/doc/examples/parse3.c
@@ -2,7 +2,7 @@
  * section: Parsing
  * synopsis: Parse an XML document in memory to a tree and free it
  * purpose: Demonstrate the use of xmlReadMemory() to read an XML file
- *          into a tree and and xmlFreeDoc() to free the resulting tree
+ *          into a tree and xmlFreeDoc() to free the resulting tree
  * usage: parse3
  * test: parse3
  * author: Daniel Veillard
diff --git a/doc/examples/parse4.c b/doc/examples/parse4.c
index 3e280560..c7095e56 100644
--- a/doc/examples/parse4.c
+++ b/doc/examples/parse4.c
@@ -3,7 +3,7 @@
  * synopsis: Parse an XML document chunk by chunk to a tree and free it
  * purpose: Demonstrate the use of xmlCreatePushParserCtxt() and
  *          xmlParseChunk() to read an XML file progressively
- *          into a tree and and xmlFreeDoc() to free the resulting tree
+ *          into a tree and xmlFreeDoc() to free the resulting tree
  * usage: parse4 test3.xml
  * test: parse4 test3.xml
  * author: Daniel Veillard
diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c
index 3eeb61fe..1899474b 100644
--- a/doc/examples/reader3.c
+++ b/doc/examples/reader3.c
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
     doc = extractFile(filename, (const xmlChar *) pattern);
     if (doc != NULL) {
         /*
-        * ouptut the result.
+        * output the result.
         */
         xmlDocDump(stdout, doc);
        /*
diff --git a/doc/examples/reader4.c b/doc/examples/reader4.c
index 1289d0d4..5ed58838 100644
--- a/doc/examples/reader4.c
+++ b/doc/examples/reader4.c
@@ -27,7 +27,7 @@ static void processDoc(xmlTextReaderPtr readerPtr) {
     }
 
     /*
-     * One can obtain the document pointer to get insteresting
+     * One can obtain the document pointer to get interesting
      * information about the document like the URL, but one must also
      * be sure to clean it up at the end (see below).
      */
diff --git a/doc/index.py b/doc/index.py
index 1895d84d..77f9692d 100755
--- a/doc/index.py
+++ b/doc/index.py
@@ -29,7 +29,7 @@
 #
 # Then run the script in the doc subdir, it will create the symbols and
 # word tables and populate them with informations extracted from 
-# the libxml2-api.xml API description, and make then accessible read-only
+# the libxml2-api.xml API description, and make them accessible read-only
 # by nobody@loaclhost the user expected to be Apache's one
 #
 # On the Apache configuration, make sure you have php support enabled
diff --git a/doc/xml.html b/doc/xml.html
index 336b2ab4..126563b2 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -2148,7 +2148,7 @@ Gansterer),<br/>
       on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
       principal node of axis bug, HTML serialization of some codepoint
       (Steven Rainwater), user data propagation in XInclude (Michael Day),
-      standalone and XML decl detection (Michael Day), Python id ouptut
+      standalone and XML decl detection (Michael Day), Python id output
       for some id, fix the big python string memory leak, URI parsing fixes
       (Stéphane Bidoul and William), long comments parsing bug (William),
       concurrent threads initialization (Ted Phelps), invalid char
@@ -2160,7 +2160,7 @@ Gansterer),<br/>
       min occurs of 0 (William), HTML script/style parsing (Mike Day)</li>
   <li>Improvement: make xmlTextReaderSetup() public</li>
   <li>Compilation and postability: fix a missing include problem (William),
-      __ss_familly on AIX again (Björn Wiberg), compilation without zlib
+      __ss_family on AIX again (Björn Wiberg), compilation without zlib
       (Michael Day), catalog patch for Win32 (Christian Ehrlicher),
       Windows CE fixes (Andreas Stricke)</li>
   <li>Various CVS to SVN infrastructure changes</li>
@@ -2199,7 +2199,7 @@ Gansterer),<br/>
       fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
       crasher, parser safety patch (Ben Darnell), _private context propagation
       when parsing entities (with Michael Day), fix entities behaviour when 
-      using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity
+      using SAX, URI to file path fix (Mikhail Zabaluev), disappearing validity
       context, arg error in SAX callback (Mike Hommey), fix mixed-content
       autodetect when using --noblanks, fix xmlIOParseDTD error handling,
       fix bug in xmlSplitQName on special Names, fix Relax-NG element content
@@ -2287,7 +2287,7 @@ Gansterer),<br/>
     split problem (William), issues with non-namespaced attributes in
     xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
     HTML parsing of script, Python must not output to stdout (Nic Ferrier),
-    exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+    exclusive C14N namespace visibility (Aleksey Sanin), XSD datatype
     totalDigits bug (Kasimier Buchcik), error handling when writing to an
     xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
     Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
@@ -2296,7 +2296,7 @@ Gansterer),<br/>
     (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
     runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
     (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
-    compilation and build fixes (Michael Day), removed dependancies on
+    compilation and build fixes (Michael Day), removed dependencies on
     xmlSchemaValidError (Kasimier), bug with &lt;xml:foo/&gt;, more XPath
     pattern based evaluation fixes (Kasimier)</li>
   <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier
@@ -2343,7 +2343,7 @@ Gansterer),<br/>
     foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
     Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
     namespace ahndling in Schemas (Kasimier), empty model group in Schemas
-    (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+    (Kasimier), wildcard in Schemas (Kasimier), URI composition (William),
     xs:anyType in Schemas (Kasimier), Python resolver emmitting error
     messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
     fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
@@ -2524,7 +2524,7 @@ Gansterer),<br/>
     Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
     transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
     (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
-    handling of failed realloc(), out of bound array adressing in Schemas
+    handling of failed realloc(), out of bound array addressing in Schemas
     date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
     E20 validation fix (Malcolm),</li>
   <li>improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
@@ -2542,7 +2542,7 @@ Gansterer),<br/>
     (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
     and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
     problem (William), Schemas hexbinary empty values, encoding error could
-    genrate a serialization loop.</li>
+    generate a serialization loop.</li>
   <li>Improvements: Schemas validity improvements (Kasimier), added --path
     and --load-trace options to xmllint</li>
   <li>documentation: tutorial update (John Fleck)</li>
@@ -2707,7 +2707,7 @@ Gansterer),<br/>
     --with-minimum configuration.</li>
   <li>XInclude: allow the 2001 namespace without warning.</li>
   <li>Documentation: missing example/index.html (John Fleck), version
-    dependancies (John Fleck)</li>
+    dependencies (John Fleck)</li>
   <li>reader API: structured error reporting (Steve Ball)</li>
   <li>Windows compilation: mingw, msys (Mikhail Grushinskiy), function
     prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
@@ -2847,7 +2847,7 @@ Gansterer),<br/>
     intercepted at a structured level, with precise information
   available.</li>
   <li>New simpler and more generic XML and HTML parser APIs, allowing to
-    easilly modify the parsing options and reuse parser context for multiple
+    easily modify the parsing options and reuse parser context for multiple
     consecutive documents.</li>
   <li>Similar new APIs for the xmlReader, for options and reuse, provided new
     functions to access content as const strings, use them for Python
@@ -6159,7 +6159,7 @@ following:</p>
   <li>remove your config.cache, relaunch your configuration mechanism, and
     recompile, if steps 2 and 3 were done right it should compile as-is</li>
   <li>Test that your application is still running correctly, if not this may
-    be due to extra empty nodes due to formating spaces being kept in libxml2
+    be due to extra empty nodes due to formatting spaces being kept in libxml2
     contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your
     code before calling the parser (next to
     <strong>LIBXML_TEST_VERSION</strong> is a fine place).</li>
diff --git a/doc/xmlreader.html b/doc/xmlreader.html
index 38608c12..354e5bdf 100644
--- a/doc/xmlreader.html
+++ b/doc/xmlreader.html
@@ -52,7 +52,7 @@ examples using both C and the Python bindings:</p>
 
 <p>Libxml2 <a href="http://xmlsoft.org/html/libxml-tree.html";>main API is
 tree based</a>, where the parsing operation results in a document loaded
-completely in memory, and expose it as a tree of nodes all availble at the
+completely in memory, and expose it as a tree of nodes all available at the
 same time. This is very simple and quite powerful, but has the major
 limitation that the size of the document that can be hamdled is limited by
 the size of the memory available. Libxml2 also provide a <a
@@ -156,7 +156,7 @@ href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html";>xmlTextReader
 is abstracted as a class like in C#</a> with the same method names (but the
 properties are currently accessed with methods) and that one doesn't need to
 free the reader at the end of the processing. It will get garbage collected
-once all references have disapeared.</p>
+once all references have disappeared.</p>
 
 <h2><a name="Extracting">Extracting information for the current node</a></h2>
 
@@ -299,7 +299,7 @@ their content the API has special instructions. Basically two kinds of operation
 are possible:</p>
 <ol>
   <li>to move the reader to the attribute nodes of the current element, in
-    that case the cursor is positionned on the attribute node</li>
+    that case the cursor is positioned on the attribute node</li>
   <li>to directly query the element node for the attribute value</li>
 </ol>
 
@@ -383,7 +383,7 @@ and set the values of those parser properties of the reader. For example</p>
 
 <p>This routine will parse and validate the file. Error messages can be
 captured by registering an error handler. See python/tests/reader2.py for
-more complete Python examples. At the C level the equivalent call to cativate
+more complete Python examples. At the C level the equivalent call to ativate
 the validation feature is just:</p>
 <pre>ret = xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1)</pre>
 
@@ -392,7 +392,7 @@ the validation feature is just:</p>
 <h2><a name="Entities">Entities substitution</a></h2>
 
 <p>By default the xmlReader will report entities as such and not replace them
-with their content. This default behaviour can however be overriden using:</p>
+with their content. This default behaviour can however be overridden using:</p>
 
 <p><code>reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)</code></p>
 
@@ -404,7 +404,7 @@ with their content. This default behaviour can however be overriden using:</p>
 Relax-NG schemas. While the Relax NG validator can't always work in a
 streamable mode, only subsets which cannot be reduced to regular expressions
 need to have their subtree expanded for validation. In practice it means
-that, unless the schemas for the top level element content is not expressable
+that, unless the schemas for the top level element content is not expressible
 as a regexp, only chunk of the document needs to be parsed while
 validating.</p>
 
diff --git a/enc.h b/enc.h
index 057d206d..a69a5d03 100644
--- a/enc.h
+++ b/enc.h
@@ -1,7 +1,7 @@
 /*
  * Summary: Internal Interfaces for encoding in libxml2
  * Description: this module describes a few interfaces which were
- *              addded along with the API changes in 2.9.0
+ *              added along with the API changes in 2.9.0
  *              those are private routines at this point
  *
  * Copy: See Copyright for the status of this software.
diff --git a/encoding.c b/encoding.c
index a3aaf10e..ad4d8a63 100644
--- a/encoding.c
+++ b/encoding.c
@@ -1795,7 +1795,7 @@ xmlFindCharEncodingHandler(const char *name) {
  *
  * The value of @inlen after return is the number of octets consumed
  *     as the return value is positive, else unpredictable.
- * The value of @outlen after return is the number of ocetes consumed.
+ * The value of @outlen after return is the number of octets consumed.
  */
 static int
 xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
@@ -1863,7 +1863,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
  *
  * The value of @inlen after return is the number of octets consumed
  *     as the return value is positive, else unpredictable.
- * The value of @outlen after return is the number of ocetes consumed.
+ * The value of @outlen after return is the number of octets consumed.
  */
 static int
 xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
@@ -1972,7 +1972,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
 
 /**
  * xmlCharEncFirstLineInt:
- * @handler:   char enconding transformation data structure
+ * @handler:   char encoding transformation data structure
  * @out:  an xmlBuffer for the output.
  * @in:  an xmlBuffer for the input
  * @len:  number of bytes to convert for the first line, or -1
@@ -2059,7 +2059,7 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
 
 /**
  * xmlCharEncFirstLine:
- * @handler:   char enconding transformation data structure
+ * @handler:   char encoding transformation data structure
  * @out:  an xmlBuffer for the output.
  * @in:  an xmlBuffer for the input
  *
@@ -2546,7 +2546,7 @@ retry:
 
 /**
  * xmlCharEncOutFunc:
- * @handler:   char enconding transformation data structure
+ * @handler:   char encoding transformation data structure
  * @out:  an xmlBuffer for the output.
  * @in:  an xmlBuffer for the input
  *
@@ -2710,7 +2710,7 @@ retry:
 
 /**
  * xmlCharEncCloseFunc:
- * @handler:   char enconding transformation data structure
+ * @handler:   char encoding transformation data structure
  *
  * Generic front-end for encoding handler close function
  *
@@ -2811,7 +2811,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
        xmlCharEncodingHandler * handler = in->buf->encoder;
         /*
         * Encoding conversion, compute the number of unused original
-        * bytes from the input not consumed and substract that from
+        * bytes from the input not consumed and subtract that from
         * the raw consumed value, this is not a cheap operation
         */
         if (in->end - in->cur > 0) {
@@ -2860,7 +2860,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
  * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
  * The value of @inlen after return is the number of octets consumed
  *     as the return value is positive, else unpredictable.
- * The value of @outlen after return is the number of ocetes consumed.
+ * The value of @outlen after return is the number of octets consumed.
  */
 static int
 UTF8ToISO8859x(unsigned char* out, int *outlen,
@@ -2976,7 +2976,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
  * block of chars out.
  * Returns 0 if success, or -1 otherwise
  * The value of @inlen after return is the number of octets consumed
- * The value of @outlen after return is the number of ocetes produced.
+ * The value of @outlen after return is the number of octets produced.
  */
 static int
 ISO8859xToUTF8(unsigned char* out, int *outlen,
diff --git a/entities.c b/entities.c
index 43549bc5..d575e9d1 100644
--- a/entities.c
+++ b/entities.c
@@ -148,7 +148,7 @@ xmlFreeEntity(xmlEntityPtr entity)
 /*
  * xmlCreateEntity:
  *
- * internal routine doing the entity node strutures allocations
+ * internal routine doing the entity node structures allocations
  */
 static xmlEntityPtr
 xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
@@ -398,7 +398,7 @@ xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type,
  *
  * Create a new entity, this differs from xmlAddDocEntity() that if
  * the document is NULL or has no internal subset defined, then an
- * unlinked entity structure will be returned, it is then the responsability
+ * unlinked entity structure will be returned, it is then the responsibility
  * of the caller to link it to the document later or free it when not needed
  * anymore.
  *
@@ -548,7 +548,7 @@ xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name) {
  * xmlEncodeEntitiesInternal:
  * @doc:  the document containing the string
  * @input:  A string to convert to XML.
- * @attr: are we handling an atrbute value
+ * @attr: are we handling an attribute value
  *
  * Do a global encoding of a string, replacing the predefined entities
  * and non ASCII values with their entities and CharRef counterparts.
diff --git a/error.c b/error.c
index 9d39f79e..b7d5b36b 100644
--- a/error.c
+++ b/error.c
@@ -238,7 +238,7 @@ xmlParserPrintFileContext(xmlParserInputPtr input) {
  * @ctx: the parser context or NULL
  * @str: the formatted error message
  *
- * Report an erro with its context, replace the 4 old error/warning
+ * Report an error with its context, replace the 4 old error/warning
  * routines.
  */
 static void
diff --git a/example/gjobread.c b/example/gjobread.c
index a435ca4f..d092c12c 100644
--- a/example/gjobread.c
+++ b/example/gjobread.c
@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
     int i;
     gJobPtr cur;
 
-    /* COMPAT: Do not genrate nodes for formatting spaces */
+    /* COMPAT: Do not generate nodes for formatting spaces */
     LIBXML_TEST_VERSION
     xmlKeepBlanksDefault(0);
 
diff --git a/genChRanges.py b/genChRanges.py
index c1383193..0eb09d05 100755
--- a/genChRanges.py
+++ b/genChRanges.py
@@ -439,7 +439,7 @@ for f in fkeys:
        numLong  = 0
        for rg in rangeTable:
            if rg[1] < 0x10000: # if short value
-               if numShort == 0:       # first occurence
+               if numShort == 0:       # first occurrence
                    pline = "static const xmlChSRange %s_srng[] = { " % f
                else:
                    pline += ", "
@@ -449,7 +449,7 @@ for f in fkeys:
                    pline = "    "
                pline += "{0x%x, 0x%x}" % (rg[0], rg[1])
            else:               # if long value
-               if numLong == 0:        # first occurence
+               if numLong == 0:        # first occurrence
                    if numShort > 0:    # if there were shorts, finish them off
                        output.write(pline + "};\n")
                    pline = "static const xmlChLRange %s_lrng[] = { " % f
diff --git a/globals.c b/globals.c
index 20b43088..7bf985f4 100644
--- a/globals.c
+++ b/globals.c
@@ -107,7 +107,7 @@ xmlMallocFunc xmlMalloc = malloc;
  * @size:  the size requested in bytes
  *
  * The variable holding the libxml malloc() implementation for atomic
- * data (i.e. blocks not containings pointers), useful when using a
+ * data (i.e. blocks not containing pointers), useful when using a
  * garbage collecting allocator.
  *
  * Returns a pointer to the newly allocated block or NULL in case of error
@@ -260,7 +260,7 @@ static int xmlPedanticParserDefaultValueThrDef = 0;
  * Global setting, indicate that the parser should store the line number
  * in the content field of elements in the DOM tree.
  * Disabled by default since this may not be safe for old classes of
- * applicaton.
+ * application.
  */
 int xmlLineNumbersDefaultValue = 0;
 static int xmlLineNumbersDefaultValueThrDef = 0;
@@ -361,7 +361,7 @@ static const char *xmlTreeIndentStringThrDef = "  ";
  * xmlSaveNoEmptyTags:
  *
  * Global setting, asking the serializer to not output empty tags
- * as <empty/> but <empty></empty>. those two forms are undistinguishable
+ * as <empty/> but <empty></empty>. those two forms are indistinguishable
  * once parsed.
  * Disabled by default
  */
diff --git a/include/libxml/c14n.h b/include/libxml/c14n.h
index b8971d92..d74847df 100644
--- a/include/libxml/c14n.h
+++ b/include/libxml/c14n.h
@@ -28,17 +28,17 @@ extern "C" {
 #include <libxml/xpath.h>
 
 /*
- * XML Canonicazation
+ * XML Canonicalization
  * http://www.w3.org/TR/xml-c14n
  *
- * Exclusive XML Canonicazation
+ * Exclusive XML Canonicalization
  * http://www.w3.org/TR/xml-exc-c14n
  *
  * Canonical form of an XML document could be created if and only if
  *  a) default attributes (if any) are added to all nodes
  *  b) all character and parsed entity references are resolved
- * In order to achive this in libxml2 the document MUST be loaded with
- * following global setings:
+ * In order to achieve this in libxml2 the document MUST be loaded with
+ * following global settings:
  *
  *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
  *    xmlSubstituteEntitiesDefault(1);
@@ -59,7 +59,7 @@ extern "C" {
  *
  */
 typedef enum {
-    XML_C14N_1_0            = 0,    /* Origianal C14N 1.0 spec */
+    XML_C14N_1_0            = 0,    /* Original C14N 1.0 spec */
     XML_C14N_EXCLUSIVE_1_0  = 1,    /* Exclusive C14N 1.0 spec */
     XML_C14N_1_1            = 2     /* C14N 1.1 spec */
 } xmlC14NMode;
@@ -96,7 +96,7 @@ XMLPUBFUN int XMLCALL
 /**
  * xmlC14NIsVisibleCallback:
  * @user_data: user data
- * @node: the curent node
+ * @node: the current node
  * @parent: the parent node
  *
  * Signature for a C14N callback on visible nodes
diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h
index 5a13f51b..26b178db 100644
--- a/include/libxml/catalog.h
+++ b/include/libxml/catalog.h
@@ -39,7 +39,7 @@ extern "C" {
 /**
  * XML_CATALOG_PI:
  *
- * The specific XML Catalog Processing Instuction name.
+ * The specific XML Catalog Processing Instruction name.
  */
 #define XML_CATALOG_PI                                         \
     (const xmlChar *) "oasis-xml-catalog"
diff --git a/include/libxml/hash.h b/include/libxml/hash.h
index 6352874e..b682b6b9 100644
--- a/include/libxml/hash.h
+++ b/include/libxml/hash.h
@@ -80,7 +80,7 @@ typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name);
 /**
  * xmlHashScanner:
  * @payload:  the data in the hash
- * @data:  extra scannner data
+ * @data:  extra scanner data
  * @name:  the name associated
  *
  * Callback when scanning data in a hash with the simple scanner.
@@ -89,7 +89,7 @@ typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name);
 /**
  * xmlHashScannerFull:
  * @payload:  the data in the hash
- * @data:  extra scannner data
+ * @data:  extra scanner data
  * @name:  the name associated
  * @name2:  the second name associated
  * @name3:  the third name associated
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 47fbec03..c295554f 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -283,11 +283,11 @@ struct _xmlParserCtxt {
     void *            *pushTab;       /* array of data for push */
     xmlHashTablePtr    attsDefault;   /* defaulted attributes if any */
     xmlHashTablePtr    attsSpecial;   /* non-CDATA attributes if any */
-    int                nsWellFormed;  /* is the document XML Nanespace okay */
+    int                nsWellFormed;  /* is the document XML Namespace okay */
     int                options;       /* Extra options */
 
     /*
-     * Those fields are needed only for treaming parsing so far
+     * Those fields are needed only for streaming parsing so far
      */
     int               dictNames;    /* Use dictionary names for the tree */
     int               freeElemsNr;  /* number of freed element nodes */
@@ -1097,7 +1097,7 @@ typedef enum {
     XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
     XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
     XML_PARSE_SAX1     = 1<<9, /* use the SAX1 interface internally */
-    XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition  */
+    XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution  */
     XML_PARSE_NONET    = 1<<11,/* Forbid network access */
     XML_PARSE_NODICT   = 1<<12,/* Do not reuse the context dictionary */
     XML_PARSE_NSCLEAN  = 1<<13,/* remove redundant namespaces declarations */
@@ -1191,7 +1191,7 @@ XMLPUBFUN xmlDocPtr XMLCALL
 /**
  * xmlFeature:
  *
- * Used to examine the existance of features that can be enabled
+ * Used to examine the existence of features that can be enabled
  * or disabled at compile-time.
  * They used to be called XML_FEATURE_xxx but this clashed with Expat
  */
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index f30fc687..1f26ce20 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -43,7 +43,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
 /**
  * XML_MAX_NAME_LENGTH:
  *
- * Maximum size allowed for a markup identitier
+ * Maximum size allowed for a markup identifier.
  * This is not a limitation of the parser but a safety boundary feature,
  * use XML_PARSE_HUGE option to override it.
  * Note that with the use of parsing dictionaries overriding the limit
diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h
index 6fb71139..c521d1c1 100644
--- a/include/libxml/schemasInternals.h
+++ b/include/libxml/schemasInternals.h
@@ -321,13 +321,13 @@ struct _xmlSchemaWildcard {
 /**
  * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
  *
- * The attribute wildcard has been already builded.
+ * The attribute wildcard has been built.
  */
 #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
 /**
  * XML_SCHEMAS_ATTRGROUP_GLOBAL:
  *
- * The attribute wildcard has been already builded.
+ * The attribute group has been defined.
  */
 #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
 /**
@@ -725,7 +725,7 @@ struct _xmlSchemaType {
 /**
  * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
  *
- * disallowed substitutions: "substituion"
+ * disallowed substitutions: "substitution"
  */
 #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION        1 << 13
 /**
@@ -789,7 +789,7 @@ struct _xmlSchemaElement {
     xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
     xmlSchemaContentType contentType;
     const xmlChar *refPrefix; /* Deprecated; not used */
-    xmlSchemaValPtr defVal; /* The compiled value contraint. */
+    xmlSchemaValPtr defVal; /* The compiled value constraint. */
     void *idcs; /* The identity-constraint defs */
 };
 
@@ -881,7 +881,7 @@ struct _xmlSchemaNotation {
 /**
  * XML_SCHEMAS_FINAL_DEFAULT_LIST:
  *
- * the cshema has "list" in the set of finalDefault.
+ * the schema has "list" in the set of finalDefault.
  */
 #define XML_SCHEMAS_FINAL_DEFAULT_LIST            1 << 4
 /**
@@ -942,7 +942,7 @@ struct _xmlSchema {
     xmlDictPtr      dict;
     void *includes;     /* the includes, this is opaque for now */
     int preserve;        /* whether to free the document */
-    int counter; /* used to give ononymous components unique names */
+    int counter; /* used to give anonymous components unique names */
     xmlHashTablePtr idcDef; /* All identity-constraint defs. */
     void *volatiles; /* Obsolete */
 };
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 626ed6ae..6cfd7318 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -527,7 +527,7 @@ struct _xmlNode {
  * xmlDocProperty
  *
  * Set of properties of the document as found by the parser
- * Some of them are linked to similary named xmlParserOption
+ * Some of them are linked to similarly named xmlParserOption
  */
 typedef enum {
     XML_DOC_WELLFORMED         = 1<<0, /* document is XML well formed */
diff --git a/include/libxml/xlink.h b/include/libxml/xlink.h
index a209a997..04e4b32c 100644
--- a/include/libxml/xlink.h
+++ b/include/libxml/xlink.h
@@ -26,7 +26,7 @@ extern "C" {
  *       of namespaces. If "foo" is the prefix for "http://foo.com/";
  *       then the link detection layer will expand role="foo:myrole"
  *       to "http://foo.com/:myrole";.
- * NOTE: the link detection layer will expand URI-Refences found on
+ * NOTE: the link detection layer will expand URI-References found on
  *       href attributes by using the base mechanism if found.
  */
 typedef xmlChar *xlinkHRef;
diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h
index 3e41744d..993ae87c 100644
--- a/include/libxml/xmlIO.h
+++ b/include/libxml/xmlIO.h
@@ -27,7 +27,7 @@ extern "C" {
  * @filename: the filename or URI
  *
  * Callback used in the I/O Input API to detect if the current handler
- * can provide input fonctionnalities for this resource.
+ * can provide input fonctionnalites for this resource.
  *
  * Returns 1 if yes and 0 if another Input module should be used
  */
@@ -73,7 +73,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
  * @filename: the filename or URI
  *
  * Callback used in the I/O Output API to detect if the current handler
- * can provide output fonctionnalities for this resource.
+ * can provide output fonctionnalites for this resource.
  *
  * Returns 1 if yes and 0 if another Output module should be used
  */
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 037c16d5..c1019971 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -837,7 +837,7 @@ typedef enum {
  * xmlGenericErrorFunc:
  * @ctx:  a parsing context
  * @msg:  the message
- * @...:  the extra arguments of the varags to format the message
+ * @...:  the extra arguments of the varargs to format the message
  *
  * Signature of the function to use when there is an error and
  * no parsing or validity context available .
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
index 5137de55..4ef3909b 100644
--- a/include/libxml/xpath.h
+++ b/include/libxml/xpath.h
@@ -84,7 +84,7 @@ struct _xmlNodeSet {
     int nodeNr;                        /* number of nodes in the set */
     int nodeMax;               /* size of the array as allocated */
     xmlNodePtr *nodeTab;       /* array of nodes in no particular order */
-    /* @@ with_ns to check wether namespace nodes should be looked at @@ */
+    /* @@ with_ns to check whether namespace nodes should be looked at @@ */
 };
 
 /*
diff --git a/include/win32config.h b/include/win32config.h
index 7fc74031..54392f49 100644
--- a/include/win32config.h
+++ b/include/win32config.h
@@ -38,7 +38,7 @@
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 /* MS C-runtime has functions which can be used in order to determine if
    a given floating-point variable contains NaN, (+-)INF. These are 
-   preferred, because floating-point technology is considered propriatary
+   preferred, because floating-point technology is considered proprietary
    by MS and we can assume that their functions know more about their 
    oddities than we do. */
 #include <float.h>
diff --git a/libxml.h b/libxml.h
index 77623310..1090729c 100644
--- a/libxml.h
+++ b/libxml.h
@@ -34,7 +34,7 @@
 /*
  * Currently supported platforms use either autoconf or
  * copy to config.h own "preset" configuration file.
- * As result ifdef HAVE_CONFIG_H is omited here.
+ * As result ifdef HAVE_CONFIG_H is omitted here.
  */
 #include "config.h"
 #include <libxml/xmlversion.h>
@@ -53,7 +53,7 @@ int vfprintf(FILE *, const char *, va_list);
 /**
  * TRIO_REPLACE_STDIO:
  *
- * This macro is defined if teh trio string formatting functions are to
+ * This macro is defined if the trio string formatting functions are to
  * be used instead of the default stdio ones.
  */
 #define TRIO_REPLACE_STDIO
@@ -86,7 +86,7 @@ int vfprintf(FILE *, const char *, va_list);
  */
 extern int __xmlRegisterCallbacks;
 /*
- * internal error reporting routines, shared but not partof the API.
+ * internal error reporting routines, shared but not part of the API.
  */
 void __xmlIOErr(int domain, int code, const char *extra);
 void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
diff --git a/nanohttp.c b/nanohttp.c
index 2143718a..018b7e18 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1143,12 +1143,12 @@ xmlNanoHTTPConnectHost(const char *host, int port)
 
            switch (h_errno) {
                case HOST_NOT_FOUND:
-                   h_err_txt = "Authoritive host not found";
+                   h_err_txt = "Authoritative host not found";
                    break;
 
                case TRY_AGAIN:
                    h_err_txt =
-                       "Non-authoritive host not found or server failure.";
+                       "Non-authoritative host not found or server failure.";
                    break;
 
                case NO_RECOVERY:
diff --git a/parser.c b/parser.c
index 4e98a9a8..8a19cde3 100644
--- a/parser.c
+++ b/parser.c
@@ -114,7 +114,7 @@ xmlParseElementEnd(xmlParserCtxtPtr ctxt);
 /*
  * XML_PARSER_NON_LINEAR is the threshold where the ratio of parsed entity
  *    replacement over the size in byte of the input indicates that you have
- *    and eponential behaviour. A value of 10 correspond to at least 3 entity
+ *    and exponential behaviour. A value of 10 correspond to at least 3 entity
  *    replacement per byte of input.
  */
 #define XML_PARSER_NON_LINEAR 10
@@ -1069,7 +1069,7 @@ xmlHasFeature(xmlFeature feature)
  * xmlDetectSAX2:
  * @ctxt:  an XML parser context
  *
- * Do the SAX2 detection and specific intialization
+ * Do the SAX2 detection and specific initialization
  */
 static void
 xmlDetectSAX2(xmlParserCtxtPtr ctxt) {
@@ -1401,7 +1401,7 @@ xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt)
  * [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+
  * [38] Subcode ::= ([a-z] | [A-Z])+
  *
- * The current REC reference the sucessors of RFC 1766, currently 5646
+ * The current REC reference the successors of RFC 1766, currently 5646
  *
  * http://www.rfc-editor.org/rfc/rfc5646.txt
  * langtag       = language
@@ -2722,7 +2722,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                    /*
                     * Note: external parsed entities will not be loaded,
                     * it is not required for a non-validating parser to
-                    * complete external PEreferences coming from the
+                    * complete external PEReferences coming from the
                     * internal subset
                     */
                    if (((ctxt->options & XML_PARSE_NOENT) != 0) ||
@@ -3386,7 +3386,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
            /*
             * when shrinking to extend the buffer we really need to preserve
             * the part of the name we already parsed. Hence rolling back
-            * by current lenght.
+            * by current length.
             */
            ctxt->input->cur -= l;
            GROW;
@@ -3855,7 +3855,7 @@ error:
  * xmlParseAttValueComplex:
  * @ctxt:  an XML parser context
  * @len:   the resulting attribute len
- * @normalize:  wether to apply the inner normalization
+ * @normalize:  whether to apply the inner normalization
  *
  * parse a value for an attribute, this is the fallback function
  * of xmlParseAttValue() when the attribute parsing requires handling
@@ -4082,7 +4082,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
 
     /*
      * There we potentially risk an overflow, don't allow attribute value of
-     * length more than INT_MAX it is a very reasonnable assumption !
+     * length more than INT_MAX it is a very reasonable assumption !
      */
     if (len >= INT_MAX) {
         xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
@@ -4687,7 +4687,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
  * xmlParseCommentComplex:
  * @ctxt:  an XML parser context
  * @buf:  the already parsed part of the buffer
- * @len:  number of bytes filles in the buffer
+ * @len:  number of bytes in the buffer
  * @size:  allocated size of the buffer
  *
  * Skip an XML (SGML) comment <!-- .... -->
@@ -5112,7 +5112,7 @@ error:
  *
  * [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
  *
- * The processing is transfered to SAX once parsed.
+ * The processing is transferred to SAX once parsed.
  */
 
 void
@@ -5528,7 +5528,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
                                    literal, URI, NULL);
                    /*
                     * For expat compatibility in SAX mode.
-                    * assuming the entity repalcement was asked for
+                    * assuming the entity replacement was asked for
                     */
                    if ((ctxt->replaceEntities != 0) &&
                        ((ctxt->myDoc == NULL) ||
@@ -6831,7 +6831,7 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
 
     /*
      * detect requirement to exit there and act accordingly
-     * and avoid having instate overriden later on
+     * and avoid having instate overridden later on
      */
     if (ctxt->instate == XML_PARSER_EOF)
         return;
@@ -7689,7 +7689,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
     }
 
     /*
-     * Increate the number of entity references parsed
+     * Increase the number of entity references parsed
      */
     ctxt->nbentities++;
 
@@ -7865,7 +7865,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
     NEXT;
 
     /*
-     * Increate the number of entity references parsed
+     * Increase the number of entity references parsed
      */
     ctxt->nbentities++;
 
@@ -8131,7 +8131,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
     ptr++;
 
     /*
-     * Increate the number of entity references parsed
+     * Increase the number of entity references parsed
      */
     ctxt->nbentities++;
 
@@ -9091,7 +9091,7 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
        if (normalize) {
            /*
             * Sometimes a second normalisation pass for spaces is needed
-            * but that only happens if charrefs or entities refernces
+            * but that only happens if charrefs or entities references
             * have been used in the attribute value, i.e. the attribute
             * value have been extracted in an allocated string already.
             */
@@ -10317,7 +10317,7 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
        }
 
        /*
-        * UTF-16 encoding stwich has already taken place at this stage,
+        * UTF-16 encoding switch has already taken place at this stage,
         * more over the little-endian/big-endian selection is already done
         */
         if ((encoding != NULL) &&
@@ -11200,7 +11200,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
        else {
            /*
             * If we are operating on converted input, try to flush
-            * remainng chars to avoid them stalling in the non-converted
+            * remaining chars to avoid them stalling in the non-converted
             * buffer. But do not do this in document start where
             * encoding="..." may not have been read and we work on a
             * guessed encoding.
diff --git a/parserInternals.c b/parserInternals.c
index 0f015ded..b00cd08e 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -703,7 +703,7 @@ encoding_error:
     /*
      * An encoding problem may arise from a truncated input buffer
      * splitting a character in the middle. In that case do not raise
-     * an error but return 0 to endicate an end of stream problem
+     * an error but return 0 to indicate an end of stream problem
      */
     if (ctxt->input->end - ctxt->input->cur < 4) {
        *len = 0;
@@ -816,7 +816,7 @@ encoding_error:
     /*
      * An encoding problem may arise from a truncated input buffer
      * splitting a character in the middle. In that case do not raise
-     * an error but return 0 to endicate an end of stream problem
+     * an error but return 0 to indicate an end of stream problem
      */
     if ((ctxt == NULL) || (ctxt->input == NULL) ||
         (ctxt->input->end - ctxt->input->cur < 4)) {
@@ -1093,7 +1093,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
        }
     }
     /*
-     * TODO: We could recover from errors in external entites if we
+     * TODO: We could recover from errors in external entities if we
      * didn't stop the parser. But most callers of this function don't
      * check the return value.
      */
@@ -1138,7 +1138,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
     if (input->buf != NULL) {
         if (input->buf->encoder != NULL) {
             /*
-             * Check in case the auto encoding detetection triggered
+             * Check in case the auto encoding detection triggered
              * in already.
              */
             if (input->buf->encoder == handler)
diff --git a/pattern.c b/pattern.c
index fdf5c79d..27e96946 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1,5 +1,5 @@
 /*
- * pattern.c: Implemetation of selectors for nodes
+ * pattern.c: Implementation of selectors for nodes
  *
  * Reference:
  *   http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
@@ -55,7 +55,7 @@
 /*
 * NOTE: Those private flags (XML_STREAM_xxx) are used
 *   in _xmlStreamCtxt->flag. They extend the public
-*   xmlPatternFlags, so be carefull not to interfere with the
+*   xmlPatternFlags, so be careful not to interfere with the
 *   reserved values for xmlPatternFlags.
 */
 #define XML_STREAM_FINAL_IS_ANY_NODE 1<<14
@@ -745,7 +745,7 @@ rollback:
  * xmlPatScanLiteral:
  * @ctxt:  the XPath Parser context
  *
- * Parse an XPath Litteral:
+ * Parse an XPath Literal:
  *
  * [29] Literal ::= '"' [^"]* '"'
  *                | "'" [^']* "'"
@@ -1976,7 +1976,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
            } else {
                /*
                * If there are "//", then we need to process every "//"
-               * occuring in the states, plus any other state for this
+               * occurring in the states, plus any other state for this
                * level.
                */
                stepNr = stream->states[2 * i];
diff --git a/python/libxml.c b/python/libxml.c
index 5b1ff6e8..bc676c4e 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -236,7 +236,7 @@ libxml_xmlDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
 /************************************************************************
  *                                                                     *
  *             Handling Python FILE I/O at the C level                 *
- *     The raw I/O attack diectly the File objects, while the          *
+ *     The raw I/O attack directly the File objects, while the         *
  *     other routines address the ioWrapper instance instead           *
  *                                                                     *
  ************************************************************************/
@@ -1435,7 +1435,7 @@ static xmlSAXHandler pythonSaxHandler = {
     pythonCdataBlock,
     pythonExternalSubset,
     1,
-    NULL,                      /* TODO mograte to SAX2 */
+    NULL,                      /* TODO migrate to SAX2 */
     NULL,
     NULL,
     NULL
@@ -3327,7 +3327,7 @@ libxml_xmlSchemaValidityGenericErrorFuncHandler(void *ctx, char *str)
        xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
 
 #ifdef DEBUG_ERROR
-       printf("libxml_xmlSchemaValiditiyGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+       printf("libxml_xmlSchemaValidityGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
 #endif
 
        pyCtxt = (xmlSchemaValidCtxtPyCtxtPtr) ctx;
@@ -3911,7 +3911,7 @@ void initlibxml2mod(void)
 #if PY_MAJOR_VERSION >= 3
     module = PyModule_Create(&moduledef);
 #else
-    /* intialize the python extension module */
+    /* initialize the python extension module */
     module = Py_InitModule((char *) "libxml2mod", libxmlMethods);
 #endif
     if (module == NULL)
diff --git a/python/types.c b/python/types.c
index 124af565..c2bafeb1 100644
--- a/python/types.c
+++ b/python/types.c
@@ -65,7 +65,7 @@ libxml_PyFileGet(PyObject *f) {
      * before and after a conversion took place. No way around it
      * in the Python3 infrastructure !
      * The duplicated fd and FILE * will be released in the subsequent
-     * call to libxml_PyFileRelease() which must be genrated accodingly
+     * call to libxml_PyFileRelease() which must be generated accordingly
      */
     fd = dup(fd);
     if (fd == -1)
diff --git a/relaxng.c b/relaxng.c
index 53125c8b..13fd954c 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -125,11 +125,11 @@ typedef enum {
     XML_RELAXNG_EXCEPT,         /* except present in nameclass defs */
     XML_RELAXNG_TEXT,           /* textual content */
     XML_RELAXNG_ELEMENT,        /* an element */
-    XML_RELAXNG_DATATYPE,       /* extenal data type definition */
-    XML_RELAXNG_PARAM,          /* extenal data type parameter */
-    XML_RELAXNG_VALUE,          /* value from an extenal data type definition */
+    XML_RELAXNG_DATATYPE,       /* external data type definition */
+    XML_RELAXNG_PARAM,          /* external data type parameter */
+    XML_RELAXNG_VALUE,          /* value from an external data type definition */
     XML_RELAXNG_LIST,           /* a list of patterns */
-    XML_RELAXNG_ATTRIBUTE,      /* an attrbute following a pattern */
+    XML_RELAXNG_ATTRIBUTE,      /* an attribute following a pattern */
     XML_RELAXNG_DEF,            /* a definition */
     XML_RELAXNG_REF,            /* reference to a definition */
     XML_RELAXNG_EXTERNALREF,    /* reference to an external def */
@@ -228,7 +228,7 @@ struct _xmlRelaxNGParserCtxt {
     xmlDocPtr document;
 
     int defNr;                  /* number of defines used */
-    int defMax;                 /* number of defines aloocated */
+    int defMax;                 /* number of defines allocated */
     xmlRelaxNGDefinePtr *defTab;        /* pointer to the allocated definitions */
 
     const char *buffer;
@@ -1128,7 +1128,7 @@ xmlRelaxNGAddStates(xmlRelaxNGValidCtxtPtr ctxt,
 /**
  * xmlRelaxNGFreeStates:
  * @ctxt:  a Relax-NG validation context
- * @states:  teh container
+ * @states:  the container
  *
  * Free a RelaxNG validation state container
  */
@@ -1340,7 +1340,7 @@ xmlRelaxNGCopyValidState(xmlRelaxNGValidCtxtPtr ctxt,
  *
  * Compare the validation states for equality
  *
- * Returns 1 if equald, 0 otherwise
+ * Returns 1 if equal, 0 otherwise
  */
 static int
 xmlRelaxNGEqualValidState(xmlRelaxNGValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
@@ -2815,7 +2815,7 @@ xmlRelaxNGRegisterTypeLibrary(const xmlChar * namespace, void *data,
 /**
  * xmlRelaxNGInitTypes:
  *
- * Initilize the default type libraries.
+ * Initialize the default type libraries.
  *
  * Returns 0 in case of success and -1 in case of error.
  */
@@ -2878,7 +2878,7 @@ static int xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt,
                                 xmlRelaxNGDefinePtr def);
 
 /**
- * xmlRelaxNGIsCompileable:
+ * xmlRelaxNGIsCompilable:
  * @define:  the definition to check
  *
  * Check if a definition is nullable.
@@ -2886,7 +2886,7 @@ static int xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt,
  * Returns 1 if yes, 0 if no and -1 in case of error
  */
 static int
-xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
+xmlRelaxNGIsCompilable(xmlRelaxNGDefinePtr def)
 {
     int ret = -1;
 
@@ -2901,7 +2901,7 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
         return (0);
     switch (def->type) {
         case XML_RELAXNG_NOOP:
-            ret = xmlRelaxNGIsCompileable(def->content);
+            ret = xmlRelaxNGIsCompilable(def->content);
             break;
         case XML_RELAXNG_TEXT:
         case XML_RELAXNG_EMPTY:
@@ -2909,7 +2909,7 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
             break;
         case XML_RELAXNG_ELEMENT:
             /*
-             * Check if the element content is compileable
+             * Check if the element content is compilable
              */
             if (((def->dflags & IS_NOT_COMPILABLE) == 0) &&
                 ((def->dflags & IS_COMPILABLE) == 0)) {
@@ -2917,7 +2917,7 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
 
                 list = def->content;
                 while (list != NULL) {
-                    ret = xmlRelaxNGIsCompileable(list);
+                    ret = xmlRelaxNGIsCompilable(list);
                     if (ret != 1)
                         break;
                     list = list->next;
@@ -2943,13 +2943,13 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
                                     def->name);
                 } else {
                     xmlGenericError(xmlGenericErrorContext,
-                                    "Problem in RelaxNGIsCompileable for element %s\n",
+                                    "Problem in RelaxNGIsCompilable for element %s\n",
                                     def->name);
                 }
 #endif
             }
             /*
-             * All elements return a compileable status unless they
+             * All elements return a compilable status unless they
              * are generic like anyName
              */
             if ((def->nameClass != NULL) || (def->name == NULL))
@@ -2968,7 +2968,7 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
                 def->depth = -20;
                 list = def->content;
                 while (list != NULL) {
-                    ret = xmlRelaxNGIsCompileable(list);
+                    ret = xmlRelaxNGIsCompilable(list);
                     if (ret != 1)
                         break;
                     list = list->next;
@@ -2986,7 +2986,7 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
 
                 list = def->content;
                 while (list != NULL) {
-                    ret = xmlRelaxNGIsCompileable(list);
+                    ret = xmlRelaxNGIsCompilable(list);
                     if (ret != 1)
                         break;
                     list = list->next;
@@ -3011,15 +3011,15 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
 #ifdef DEBUG_COMPILE
     if (ret == 1) {
         xmlGenericError(xmlGenericErrorContext,
-                        "RelaxNGIsCompileable %s : true\n",
+                        "RelaxNGIsCompilable %s : true\n",
                         xmlRelaxNGDefName(def));
     } else if (ret == 0) {
         xmlGenericError(xmlGenericErrorContext,
-                        "RelaxNGIsCompileable %s : false\n",
+                        "RelaxNGIsCompilable %s : false\n",
                         xmlRelaxNGDefName(def));
     } else {
         xmlGenericError(xmlGenericErrorContext,
-                        "Problem in RelaxNGIsCompileable %s\n",
+                        "Problem in RelaxNGIsCompilable %s\n",
                         xmlRelaxNGDefName(def));
     }
 #endif
@@ -3047,7 +3047,7 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
 
     switch (def->type) {
         case XML_RELAXNG_START:
-            if ((xmlRelaxNGIsCompileable(def) == 1) && (def->depth != -25)) {
+            if ((xmlRelaxNGIsCompilable(def) == 1) && (def->depth != -25)) {
                 xmlAutomataPtr oldam = ctxt->am;
                 xmlAutomataStatePtr oldstate = ctxt->state;
 
@@ -3273,7 +3273,7 @@ xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
 
     if ((def->type == XML_RELAXNG_START) ||
         (def->type == XML_RELAXNG_ELEMENT)) {
-        ret = xmlRelaxNGIsCompileable(def);
+        ret = xmlRelaxNGIsCompilable(def);
         if ((def->dflags & IS_COMPILABLE) && (def->depth != -25)) {
             ctxt->am = NULL;
             ret = xmlRelaxNGCompile(ctxt, def);
@@ -3478,7 +3478,7 @@ xmlRelaxNGIsBlank(xmlChar * str)
  *
  * Applies algorithm from 4.3. datatypeLibrary attribute
  *
- * Returns the datatypeLibary value or NULL if not found
+ * Returns the datatypeLibrary value or NULL if not found
  */
 static xmlChar *
 xmlRelaxNGGetDataTypeLibrary(xmlRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
@@ -3788,7 +3788,7 @@ static const xmlChar *invalidName = BAD_CAST "\1";
  * that if both lists do not accept the same QNames, it returns 1
  * If the 2 lists can accept the same QName the comparison returns 0
  *
- * Returns 1 disttinct, 0 if equal
+ * Returns 1 distinct, 0 if equal
  */
 static int
 xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
@@ -3889,7 +3889,7 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
  * is that if both lists do not accept the same QNames, it returns 1
  * If the 2 lists can accept the same QName the comparison returns 0
  *
- * Returns 1 disttinct, 0 if equal
+ * Returns 1 distinct, 0 if equal
  */
 static int
 xmlRelaxNGCompareElemDefLists(xmlRelaxNGParserCtxtPtr ctxt
@@ -4743,9 +4743,9 @@ xmlRelaxNGParseImportRefs(xmlRelaxNGParserCtxtPtr ctxt,
 /**
  * xmlRelaxNGProcessExternalRef:
  * @ctxt: the parser context
- * @node:  the externlRef node
+ * @node:  the externalRef node
  *
- * Process and compile an externlRef node
+ * Process and compile an externalRef node
  *
  * Returns the xmlRelaxNGDefinePtr or NULL in case of error
  */
@@ -6016,7 +6016,7 @@ xmlRelaxNGCheckCycles(xmlRelaxNGParserCtxtPtr ctxt,
  * @parent:  the parent definition
  * @prev:  the previous sibling definition
  *
- * Try to unlink a definition. If not possble make it a NOOP
+ * Try to unlink a definition. If not possible make it a NOOP
  *
  * Returns the new prev definition
  */
@@ -6666,7 +6666,7 @@ xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes)
  * @node:  the root node of the RelaxNG schema
  *
  * parse a Relax-NG definition resource and build an internal
- * xmlRelaxNG struture which can be used to validate instances.
+ * xmlRelaxNG structure which can be used to validate instances.
  *
  * Returns the internal XML RelaxNG structure built or
  *         NULL in case of error
@@ -7497,7 +7497,7 @@ xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc)
  * @ctxt:  a Relax-NG parser context
  *
  * parse a schema definition resource and build an internal
- * XML Shema struture which can be used to validate instances.
+ * XML Schema structure which can be used to validate instances.
  *
  * Returns the internal XML RelaxNG structure built from the resource or
  *         NULL in case of error
@@ -8610,7 +8610,7 @@ xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt, const xmlChar * str)
  * @type:  the datatype definition
  * @node:  the node
  *
- * Validate the given value against the dataype
+ * Validate the given value against the datatype
  *
  * Returns 0 if the validation succeeded or an error code.
  */
@@ -9766,7 +9766,7 @@ xmlRelaxNGElementMatch(xmlRelaxNGValidCtxtPtr ctxt,
  * Find the "best" state in the ctxt->states list of states to report
  * errors about. I.e. a state with no element left in the child list
  * or the one with the less attributes left.
- * This is called only if a falidation error was detected
+ * This is called only if a validation error was detected
  *
  * Returns the index of the "best" state or -1 in case of error
  */
@@ -10373,7 +10373,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
 
                     /*
                      * Something we can optimize cleanly there is only one
-                     * possble branch out !
+                     * possible branch out !
                      */
                     if ((node->type == XML_TEXT_NODE) ||
                         (node->type == XML_CDATA_SECTION_NODE)) {
@@ -10626,7 +10626,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
     if (define->name != NULL)
         xmlGenericError(xmlGenericErrorContext, "%s ", define->name);
     if (ret == 0)
-        xmlGenericError(xmlGenericErrorContext, "suceeded\n");
+        xmlGenericError(xmlGenericErrorContext, "succeeded\n");
     else
         xmlGenericError(xmlGenericErrorContext, "failed\n");
 #endif
diff --git a/result/XInclude/fallback.xml b/result/XInclude/fallback.xml
index d7eed528..6f41f80b 100644
--- a/result/XInclude/fallback.xml
+++ b/result/XInclude/fallback.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
 <x xmlns:xinclude="http://www.w3.org/2001/XInclude";>
-   <!-- Simple test of a fallback on unavailble URI -->
+   <!-- Simple test of a fallback on unavailable URI -->
    <warning>Inclusion failed</warning>
 </x>
diff --git a/result/XInclude/fallback.xml.rdr b/result/XInclude/fallback.xml.rdr
index 82072f73..d558872c 100644
--- a/result/XInclude/fallback.xml.rdr
+++ b/result/XInclude/fallback.xml.rdr
@@ -1,7 +1,7 @@
 0 1 x 0 0
 1 14 #text 0 1 
    
-1 8 #comment 0 1  Simple test of a fallback on unavailble URI 
+1 8 #comment 0 1  Simple test of a fallback on unavailable URI 
 1 14 #text 0 1 
    
 1 1 warning 0 0
diff --git a/result/valid/REC-xml-19980210.xml b/result/valid/REC-xml-19980210.xml
index f31e963c..4460b3eb 100644
--- a/result/valid/REC-xml-19980210.xml
+++ b/result/valid/REC-xml-19980210.xml
@@ -1306,7 +1306,7 @@ default white-space processing modes are acceptable for this element; the
 value "<code>preserve</code>" indicates the intent that applications preserve
 all the white space.
 This declared intent is considered to apply to all elements within the content
-of the element where it is specified, unless overriden with another instance
+of the element where it is specified, unless overridden with another instance
 of the <kw>xml:space</kw> attribute.
 </p>
 <p>The <termref def="dt-root">root element</termref> of any document
diff --git a/result/valid/xhtml1.xhtml b/result/valid/xhtml1.xhtml
index 907209bf..98b79911 100644
--- a/result/valid/xhtml1.xhtml
+++ b/result/valid/xhtml1.xhtml
@@ -1300,7 +1300,7 @@ attribute names.</li>
 
 <li>In tables, the tbody element will be inferred by the parser of an
 HTML user agent, but not by the parser of an XML user agent. Therefore
-you should always explicitely add a tbody element if it is referred to
+you should always explicitly add a tbody element if it is referred to
 in a CSS selector.</li>
 
 <li>Within the XHTML name space, user agents are expected to
diff --git a/runsuite.c b/runsuite.c
index 767455bd..d24b5ec3 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -1,5 +1,5 @@
 /*
- * runsuite.c: C program to run libxml2 againts published testsuites
+ * runsuite.c: C program to run libxml2 against published testsuites
  *
  * See Copyright for the status of this software.
  *
@@ -217,13 +217,13 @@ initializeLibxml2(void) {
     * Deactivate the cache if created; otherwise we have to create/free it
     * for every test, since it will confuse the memory leak detection.
     * Note that normally this need not be done, since the cache is not
-    * created until set explicitely with xmlXPathContextSetCache();
-    * but for test purposes it is sometimes usefull to activate the
+    * created until set explicitly with xmlXPathContextSetCache();
+    * but for test purposes it is sometimes useful to activate the
     * cache by default for the whole library.
     */
     if (ctxtXPath->cache != NULL)
        xmlXPathContextSetCache(ctxtXPath, 0, -1, 0);
-    /* used as default nanemspace in xstc tests */
+    /* used as default namespace in xstc tests */
     xmlXPathRegisterNs(ctxtXPath, BAD_CAST "ts", BAD_CAST "TestSuite");
     xmlXPathRegisterNs(ctxtXPath, BAD_CAST "xlink",
                        BAD_CAST "http://www.w3.org/1999/xlink";);
@@ -296,7 +296,7 @@ getString(xmlNodePtr cur, const char *xpath) {
  ************************************************************************/
 
 static int
-xsdIncorectTestCase(xmlNodePtr cur) {
+xsdIncorrectTestCase(xmlNodePtr cur) {
     xmlNodePtr test;
     xmlBufferPtr buf;
     xmlRelaxNGParserCtxtPtr pctxt;
@@ -332,7 +332,7 @@ xsdIncorectTestCase(xmlNodePtr cur) {
     rng = xmlRelaxNGParse(pctxt);
     xmlRelaxNGFreeParserCtxt(pctxt);
     if (rng != NULL) {
-       test_log("Failed to detect incorect RNG line %ld\n",
+       test_log("Failed to detect incorrect RNG line %ld\n",
                    xmlGetLineNo(test));
         ret = 1;
        goto done;
@@ -438,7 +438,7 @@ xsdTestCase(xmlNodePtr tst) {
 
     cur = getNext(tst, "./correct[1]");
     if (cur == NULL) {
-        return(xsdIncorectTestCase(tst));
+        return(xsdIncorrectTestCase(tst));
     }
 
     test = getNext(cur, "./*");
diff --git a/runtest.c b/runtest.c
index 13e36a49..93d39761 100644
--- a/runtest.c
+++ b/runtest.c
@@ -1,6 +1,6 @@
 /*
  * runtest.c: C program to run libxml2 regression tests without
- *            requiring make or Python, and reducing platform dependancies
+ *            requiring make or Python, and reducing platform dependencies
  *            to a strict minimum.
  *
  * To compile on Unixes:
@@ -95,7 +95,7 @@ typedef int (*functest) (const char *filename, const char *result,
 typedef struct testDesc testDesc;
 typedef testDesc *testDescPtr;
 struct testDesc {
-    const char *desc; /* descripton of the test */
+    const char *desc; /* description of the test */
     functest    func; /* function implementing the test */
     const char *in;   /* glob to path for input files */
     const char *out;  /* output directory */
@@ -3393,7 +3393,7 @@ rngStreamTest(const char *filename,
        }
        reader = xmlReaderForFile(instance, NULL, options);
        if (reader == NULL) {
-           fprintf(stderr, "Failed to build reder for %s\n", instance);
+           fprintf(stderr, "Failed to build reader for %s\n", instance);
        }
        if (disable_err == 1)
            ret = streamProcessTest(instance, result, NULL, reader, filename,
diff --git a/runxmlconf.c b/runxmlconf.c
index 27e487b8..70f61017 100644
--- a/runxmlconf.c
+++ b/runxmlconf.c
@@ -164,8 +164,8 @@ initializeLibxml2(void) {
     * Deactivate the cache if created; otherwise we have to create/free it
     * for every test, since it will confuse the memory leak detection.
     * Note that normally this need not be done, since the cache is not
-    * created until set explicitely with xmlXPathContextSetCache();
-    * but for test purposes it is sometimes usefull to activate the
+    * created until set explicitly with xmlXPathContextSetCache();
+    * but for test purposes it is sometimes useful to activate the
     * cache by default for the whole library.
     */
     if (ctxtXPath->cache != NULL)
@@ -248,7 +248,7 @@ xmlconfTestNotNSWF(const char *id, const char *filename, int options) {
 
     /*
      * In case of Namespace errors, libxml2 will still parse the document
-     * but log a Namesapce error.
+     * but log a Namespace error.
      */
     doc = xmlReadFile(filename, NULL, options);
     if (doc == NULL) {
diff --git a/save.h b/save.h
index 753aaef5..192b6741 100644
--- a/save.h
+++ b/save.h
@@ -1,7 +1,7 @@
 /*
  * Summary: Internal Interfaces for saving in libxml2
  * Description: this module describes a few interfaces which were
- *              addded along with the API changes in 2.9.0
+ *              added along with the API changes in 2.9.0
  *              those are private routines at this point
  *
  * Copy: See Copyright for the status of this software.
diff --git a/schematron.c b/schematron.c
index 6200f2d4..258ce409 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1068,7 +1068,7 @@ done:
  * @ctxt:  a schema validation context
  *
  * parse a schema definition resource and build an internal
- * XML Shema struture which can be used to validate instances.
+ * XML Schema structure which can be used to validate instances.
  *
  * Returns the internal XML Schematron structure built from the resource or
  *         NULL in case of error
@@ -1287,7 +1287,7 @@ xmlSchematronReportOutput(xmlSchematronValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
  * Build the string being reported to the user.
  *
  * Returns a report string or NULL in case of error. The string needs
- *         to be deallocated by teh caller
+ *         to be deallocated by the caller
  */
 static xmlChar *
 xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
@@ -1591,7 +1591,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
  * xmlSchematronRunTest:
  * @ctxt:  the schema validation context
  * @test:  the current test
- * @instance:  the document instace tree
+ * @instance:  the document instance tree
  * @cur:  the current node in the instance
  *
  * Validate a rule against a tree instance at a given position
@@ -1655,7 +1655,7 @@ xmlSchematronRunTest(xmlSchematronValidCtxtPtr ctxt,
 /**
  * xmlSchematronValidateDoc:
  * @ctxt:  the schema validation context
- * @instance:  the document instace tree
+ * @instance:  the document instance tree
  *
  * Validate a tree instance against the schematron
  *
diff --git a/test/XInclude/docs/fallback.xml b/test/XInclude/docs/fallback.xml
index e80222e4..d6586aec 100644
--- a/test/XInclude/docs/fallback.xml
+++ b/test/XInclude/docs/fallback.xml
@@ -1,5 +1,5 @@
 <x xmlns:xinclude="http://www.w3.org/2001/XInclude";>
-   <!-- Simple test of a fallback on unavailble URI -->
+   <!-- Simple test of a fallback on unavailable URI -->
    <xinclude:include href="something.xml">
      <xinclude:fallback><warning>Inclusion failed</warning></xinclude:fallback>
    </xinclude:include>
diff --git a/test/relaxng/docbook_0.xml b/test/relaxng/docbook_0.xml
index ede051df..551d08ab 100644
--- a/test/relaxng/docbook_0.xml
+++ b/test/relaxng/docbook_0.xml
@@ -625,7 +625,7 @@ V1.1//EN"[]>]]>
           the directory.
         </para>
         <para>
-          If you want to create PostScript ouput, you will need to create an
+          If you want to create PostScript output, you will need to create an
           EPS version of your image file to be displayed in the
           PostScript file. There is a simple script available which
           allows you to change a PNG image into an EPS file
@@ -2866,9 +2866,9 @@ GDP Team ####### -->
 
 
  <!-- For this app, one could put "proving" or "edit" (probably even
-      both of them) as sect2's seperate from the main window
+      both of them) as sect2's separate from the main window
       section. Since they were both so closely involved with the main
-      window, I decided to have them as sect3's isntead. Judgement
+      window, I decided to have them as sect3's instead. Judgement
       call. -->
 
       <sect3 id="proving">
@@ -2883,7 +2883,7 @@ GDP Team ####### -->
            bring up the <interface>New Proof</interface> dialog box.
            Enter the statement of the theorem in the
            <guilabel>Theorem statement</guilabel> field, select your
-           desired proof type from the drop-down menu, and and press
+           desired proof type from the drop-down menu, and press
            <guibutton>Prove!</guibutton>.
         </para>
        <para>
diff --git a/test/relaxng/spec_0.xml b/test/relaxng/spec_0.xml
index cb8f7be5..3cb96c78 100644
--- a/test/relaxng/spec_0.xml
+++ b/test/relaxng/spec_0.xml
@@ -530,7 +530,7 @@ value of each <literal>name</literal>, <literal>type</literal> and
 <section>
 <title><literal>datatypeLibrary</literal> attribute</title>
 
-<para>The value of each <literal>datatypeLibary</literal> attribute is
+<para>The value of each <literal>datatypeLibrary</literal> attribute is
 transformed by escaping disallowed characters as specified in Section
 5.4 of <xref linkend="xlink"/>.</para>
 
diff --git a/test/relaxng/tutor11_1_3.xml b/test/relaxng/tutor11_1_3.xml
index c778ce06..d146032d 100644
--- a/test/relaxng/tutor11_1_3.xml
+++ b/test/relaxng/tutor11_1_3.xml
@@ -1335,7 +1335,7 @@ default white-space processing modes are acceptable for this element; the
 value "<code>preserve</code>" indicates the intent that applications preserve
 all the white space.
 This declared intent is considered to apply to all elements within the content
-of the element where it is specified, unless overriden with another instance
+of the element where it is specified, unless overridden with another instance
 of the <kw>xml:space</kw> attribute.
 </p>
 <p>The <termref def='dt-root'>root element</termref> of any document
diff --git a/test/threads/abc.xml b/test/threads/abc.xml
index ee98144d..b3488eb8 100644
--- a/test/threads/abc.xml
+++ b/test/threads/abc.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE abc SYSTEM "http://example.org/abc.dtd";>
 <abc>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
   <b>Let's use a DTD defined entity &bent;</b>
   <c/>
 </abc>
diff --git a/test/threads/acb.xml b/test/threads/acb.xml
index a14e362b..e8731c20 100644
--- a/test/threads/acb.xml
+++ b/test/threads/acb.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE acb SYSTEM "http://example.org/acb.dtd";>
 <acb>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
   <c/>
   <b>Let's use a DTD defined entity &bent;</b>
 </acb>
diff --git a/test/threads/bac.xml b/test/threads/bac.xml
index 63d6efc5..899fdbf4 100644
--- a/test/threads/bac.xml
+++ b/test/threads/bac.xml
@@ -1,7 +1,7 @@
 <!DOCTYPE bac SYSTEM "http://example.org/bac.dtd";>
 <bac>
   <b>Let's use a DTD defined entity &bent;</b>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
   <c/>
 </bac>
 
diff --git a/test/threads/bca.xml b/test/threads/bca.xml
index ce60d016..266c5668 100644
--- a/test/threads/bca.xml
+++ b/test/threads/bca.xml
@@ -2,6 +2,6 @@
 <bca>
   <b>Let's use a DTD defined entity &bent;</b>
   <c/>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
 </bca>
 
diff --git a/test/threads/cab.xml b/test/threads/cab.xml
index a1631d0c..9f5397cd 100644
--- a/test/threads/cab.xml
+++ b/test/threads/cab.xml
@@ -1,7 +1,7 @@
 <!DOCTYPE cab SYSTEM "http://example.org/cab.dtd";>
 <cab>
   <c/>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
   <b>Let's use a DTD defined entity &bent;</b>
 </cab>
 
diff --git a/test/threads/cba.xml b/test/threads/cba.xml
index 78708e4d..54889269 100644
--- a/test/threads/cba.xml
+++ b/test/threads/cba.xml
@@ -2,6 +2,6 @@
 <cba>
   <c/>
   <b>Let's use a DTD defined entity &bent;</b>
-  <a>Let's use predefined entites &amp; &lt; &gt;</a>
+  <a>Let's use predefined entities &amp; &lt; &gt;</a>
 </cba>
 
diff --git a/test/valid/REC-xml-19980210.xml b/test/valid/REC-xml-19980210.xml
index 4e93fb38..bec8e904 100644
--- a/test/valid/REC-xml-19980210.xml
+++ b/test/valid/REC-xml-19980210.xml
@@ -1335,7 +1335,7 @@ default white-space processing modes are acceptable for this element; the
 value "<code>preserve</code>" indicates the intent that applications preserve
 all the white space.
 This declared intent is considered to apply to all elements within the content
-of the element where it is specified, unless overriden with another instance
+of the element where it is specified, unless overridden with another instance
 of the <kw>xml:space</kw> attribute.
 </p>
 <p>The <termref def='dt-root'>root element</termref> of any document
diff --git a/test/valid/xhtml1.xhtml b/test/valid/xhtml1.xhtml
index 24d68f43..e47f9bb1 100644
--- a/test/valid/xhtml1.xhtml
+++ b/test/valid/xhtml1.xhtml
@@ -1348,7 +1348,7 @@ attribute names.</li>
 
 <li>In tables, the tbody element will be inferred by the parser of an
 HTML user agent, but not by the parser of an XML user agent. Therefore
-you should always explicitely add a tbody element if it is referred to
+you should always explicitly add a tbody element if it is referred to
 in a CSS selector.</li>
 
 <li>Within the XHTML name space, user agents are expected to
diff --git a/testapi.c b/testapi.c
index 980d7fb5..ff8b470d 100644
--- a/testapi.c
+++ b/testapi.c
@@ -5450,7 +5450,7 @@ test_xmlC14NDocSave(void) {
     int n_with_comments;
     const char * filename; /* the filename to store canonical XML image */
     int n_filename;
-    int compression; /* the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - 
compression level */
+    int compression; /* the compression level (zlib required): -1 - libxml default, 0 - uncompressed, >0 - 
compression level */
     int n_compression;
 
     for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
@@ -8693,7 +8693,7 @@ test_xmlCharEncCloseFunc(void) {
 
     int mem_base;
     int ret_val;
-    xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+    xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
     int n_handler;
 
     for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
@@ -8725,7 +8725,7 @@ test_xmlCharEncFirstLine(void) {
 
     int mem_base;
     int ret_val;
-    xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+    xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
     int n_handler;
     xmlBufferPtr out; /* an xmlBuffer for the output. */
     int n_out;
@@ -8817,7 +8817,7 @@ test_xmlCharEncOutFunc(void) {
 
     int mem_base;
     int ret_val;
-    xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+    xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
     int n_handler;
     xmlBufferPtr out; /* an xmlBuffer for the output. */
     int n_out;
@@ -18195,7 +18195,7 @@ test_xmlSchematronValidateDoc(void) {
     int ret_val;
     xmlSchematronValidCtxtPtr ctxt; /* the schema validation context */
     int n_ctxt;
-    xmlDocPtr instance; /* the document instace tree */
+    xmlDocPtr instance; /* the document instance tree */
     int n_instance;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchematronValidCtxtPtr;n_ctxt++) {
@@ -23268,7 +23268,7 @@ test_xmlSaveFileTo(void) {
     int n_buf;
     xmlDocPtr cur; /* the document */
     int n_cur;
-    char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
+    char * encoding; /* the encoding if any assuming the I/O layer handles the transcoding */
     int n_encoding;
 
     for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
@@ -23420,7 +23420,7 @@ test_xmlSaveFormatFileTo(void) {
     int n_buf;
     xmlDocPtr cur; /* the document */
     int n_cur;
-    char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
+    char * encoding; /* the encoding if any assuming the I/O layer handles the transcoding */
     int n_encoding;
     int format; /* should formatting spaces been added */
     int n_format;
@@ -46663,7 +46663,7 @@ test_xmlXPathContextSetCache(void) {
     int n_ctxt;
     int active; /* enables/disables (creates/frees) the cache */
     int n_active;
-    int value; /* a value with semantics dependant on @options */
+    int value; /* a value with semantics dependent on @options */
     int n_value;
     int options; /* options (currently only the value 0 is used) */
     int n_options;
diff --git a/testchar.c b/testchar.c
index 0d087927..6866a175 100644
--- a/testchar.c
+++ b/testchar.c
@@ -120,7 +120,7 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
        }
 
        /*
-        * We should see no error in remaning cases
+        * We should see no error in remaining cases
         */
        else if ((lastError != 0) || (res == NULL)) {
            fprintf(stderr,
@@ -324,7 +324,7 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
            }
 
             /*
-            * We should see no error in remaning cases
+            * We should see no error in remaining cases
             */
            else if ((lastError != 0) || (len != 2)) {
                fprintf(stderr,
diff --git a/testlimits.c b/testlimits.c
index 68c94dbc..059116a6 100644
--- a/testlimits.c
+++ b/testlimits.c
@@ -1403,7 +1403,7 @@ static limitDesc limitDescriptions[] = {
 typedef struct testDesc testDesc;
 typedef testDesc *testDescPtr;
 struct testDesc {
-    const char *desc; /* descripton of the test */
+    const char *desc; /* description of the test */
     functest    func; /* function implementing the test */
 };
 
diff --git a/testrecurse.c b/testrecurse.c
index 64b9cd0b..0cbe25a6 100644
--- a/testrecurse.c
+++ b/testrecurse.c
@@ -44,7 +44,7 @@ typedef int (*functest) (const char *filename, const char *result,
 typedef struct testDesc testDesc;
 typedef testDesc *testDescPtr;
 struct testDesc {
-    const char *desc; /* descripton of the test */
+    const char *desc; /* description of the test */
     functest    func; /* function implementing the test */
     const char *in;   /* glob to path for input files */
     const char *out;  /* output directory */
diff --git a/threads.c b/threads.c
index 0433ac0f..72df9ba9 100644
--- a/threads.c
+++ b/threads.c
@@ -82,7 +82,7 @@ static int libxml_is_threaded = 1;
 
 /*
  * TODO: this module still uses malloc/free and not xmlMalloc/xmlFree
- *       to avoid some crazyness since xmlMalloc/xmlFree may actually
+ *       to avoid some craziness since xmlMalloc/xmlFree may actually
  *       be hosted on allocated blocks needing them for the allocation ...
  */
 
@@ -239,7 +239,7 @@ xmlMutexLock(xmlMutexPtr tok)
     if (acquire_sem(tok->sem) != B_NO_ERROR) {
 #ifdef DEBUG_THREADS
         xmlGenericError(xmlGenericErrorContext,
-                        "xmlMutexLock():BeOS:Couldn't aquire semaphore\n");
+                        "xmlMutexLock():BeOS:Couldn't acquire semaphore\n");
 #endif
     }
     tok->tid = find_thread(NULL);
diff --git a/timsort.h b/timsort.h
index 622705b3..383584fb 100644
--- a/timsort.h
+++ b/timsort.h
@@ -59,7 +59,7 @@ typedef unsigned __int64 uint64_t;
 #define SORT_SWAP(x,y) {SORT_TYPE __SORT_SWAP_t = (x); (x) = (y); (y) = __SORT_SWAP_t;}
 
 
-/* Common, type-agnosting functions and constants that we don't want to declare twice. */
+/* Common, type-agnostic functions and constants that we don't want to declare twice. */
 #ifndef SORT_COMMON_H
 #define SORT_COMMON_H
 
diff --git a/tree.c b/tree.c
index 47813267..08b1a500 100644
--- a/tree.c
+++ b/tree.c
@@ -59,7 +59,7 @@ int __xmlRegisterCallbacks = 0;
  ************************************************************************/
 
 static xmlNsPtr
-xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
+xmlNewReconciledNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
 
 static xmlChar* xmlGetPropNodeValueInternal(const xmlAttr *prop);
 
@@ -181,7 +181,7 @@ xmlGetEntityFromDtd(const xmlDtd *dtd, const xmlChar *name) {
  * @dtd:  A pointer to the DTD to search
  * @name:  The entity name
  *
- * Do an entity lookup in the DTD pararmeter entity hash table and
+ * Do an entity lookup in the DTD parameter entity hash table and
  * return the corresponding entity, if found.
  *
  * Returns A pointer to the entity structure or NULL if not found.
@@ -2950,7 +2950,7 @@ xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,
  * Add a new attribute after @prev using @cur as base attribute.
  * When inserting before @cur, @prev is passed as @cur->prev.
  * When inserting after @cur, @prev is passed as @cur.
- * If an existing attribute is found it is detroyed prior to adding @prop.
+ * If an existing attribute is found it is destroyed prior to adding @prop.
  *
  * Returns the attribute being inserted or NULL in case of error.
  */
@@ -4066,7 +4066,7 @@ xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
       } else {
         /*
          * we have to find something appropriate here since
-         * we cant be sure, that the namespce we found is identified
+         * we cant be sure, that the namespace we found is identified
          * by the prefix
          */
         if (xmlStrEqual(ns->href, cur->ns->href)) {
@@ -4077,7 +4077,7 @@ xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
            * we are in trouble: we need a new reconciled namespace.
            * This is expensive
            */
-          ret->ns = xmlNewReconciliedNs(target->doc, target, cur->ns);
+          ret->ns = xmlNewReconciledNs(target->doc, target, cur->ns);
         }
       }
 
@@ -4296,7 +4296,7 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
                while (root->parent != NULL) root = root->parent;
                ret->ns = xmlNewNs(root, ns->href, ns->prefix);
                } else {
-                       ret->ns = xmlNewReconciliedNs(doc, ret, node->ns);
+                       ret->ns = xmlNewReconciledNs(doc, ret, node->ns);
            }
        } else {
            /*
@@ -4735,7 +4735,7 @@ xmlGetNodePath(const xmlNode *node)
 
             /*
              * Thumbler index computation
-            * TODO: the ocurence test seems bogus for namespaced names
+            * TODO: the occurrence test seems bogus for namespaced names
              */
             tmp = cur->prev;
             while (tmp != NULL) {
@@ -6230,7 +6230,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)
 }
 
 /**
- * xmlNewReconciliedNs:
+ * xmlNewReconciledNs:
  * @doc:  the document
  * @tree:  a node expected to hold the new namespace
  * @ns:  the original namespace
@@ -6243,7 +6243,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)
  * Returns the (new) namespace definition or NULL in case of error
  */
 static xmlNsPtr
-xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
+xmlNewReconciledNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
     xmlNsPtr def;
     xmlChar prefix[50];
     int counter = 1;
@@ -6251,14 +6251,14 @@ xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
     if ((tree == NULL) || (tree->type != XML_ELEMENT_NODE)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
-               "xmlNewReconciliedNs : tree == NULL\n");
+               "xmlNewReconciledNs : tree == NULL\n");
 #endif
        return(NULL);
     }
     if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
-               "xmlNewReconciliedNs : ns == NULL\n");
+               "xmlNewReconciledNs : ns == NULL\n");
 #endif
        return(NULL);
     }
@@ -6360,7 +6360,7 @@ xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) {
                /*
                 * OK we need to recreate a new namespace definition
                 */
-               n = xmlNewReconciliedNs(doc, tree, node->ns);
+               n = xmlNewReconciledNs(doc, tree, node->ns);
                if (n != NULL) { /* :-( what if else ??? */
                    /*
                     * check if we need to grow the cache buffers.
@@ -6424,7 +6424,7 @@ xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) {
                        /*
                         * OK we need to recreate a new namespace definition
                         */
-                       n = xmlNewReconciliedNs(doc, tree, attr->ns);
+                       n = xmlNewReconciledNs(doc, tree, attr->ns);
                        if (n != NULL) { /* :-( what if else ??? */
                            /*
                             * check if we need to grow the cache buffers.
@@ -7977,7 +7977,7 @@ xmlDOMWrapNsMapAddItem(xmlNsMapPtr *nsmap, int position,
 * Creates or reuses an xmlNs struct on doc->oldNs with
 * the given prefix and namespace name.
 *
-* Returns the aquired ns struct or NULL in case of an API
+* Returns the acquired ns struct or NULL in case of an API
 *         or internal error.
 */
 static xmlNsPtr
@@ -8591,7 +8591,7 @@ ns_next_prefix:
 }
 
 /*
-* xmlDOMWrapNSNormAquireNormalizedNs:
+* xmlDOMWrapNSNormAcquireNormalizedNs:
 * @doc: the doc
 * @elem: the element-node to declare namespaces on
 * @ns: the ns-struct to use for the search
@@ -8610,7 +8610,7 @@ ns_next_prefix:
 * Returns 0 if succeeded, -1 otherwise and on API/internal errors.
 */
 static int
-xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc,
+xmlDOMWrapNSNormAcquireNormalizedNs(xmlDocPtr doc,
                                   xmlNodePtr elem,
                                   xmlNsPtr ns,
                                   xmlNsPtr *retNs,
@@ -8909,9 +8909,9 @@ next_ns_decl:
                    }
                }
                /*
-               * Aquire a normalized ns-decl and add it to the map.
+               * Acquire a normalized ns-decl and add it to the map.
                */
-               if (xmlDOMWrapNSNormAquireNormalizedNs(doc, curElem,
+               if (xmlDOMWrapNSNormAcquireNormalizedNs(doc, curElem,
                        cur->ns, &ns,
                        &nsMap, depth,
                        ancestorsOnly,
@@ -9049,7 +9049,7 @@ xmlDOMWrapAdoptBranch(xmlDOMWrapCtxtPtr ctxt,
        nsMap = (xmlNsMapPtr) ctxt->namespaceMap;
     /*
     * Disable search for ns-decls in the parent-axis of the
-    * desination element, if:
+    * destination element, if:
     * 1) there's no destination parent
     * 2) custom ns-reference handling is used
     */
@@ -9194,9 +9194,9 @@ xmlDOMWrapAdoptBranch(xmlDOMWrapCtxtPtr ctxt,
                    cur->ns = ns;
                } else {
                    /*
-                   * Aquire a normalized ns-decl and add it to the map.
+                   * Acquire a normalized ns-decl and add it to the map.
                    */
-                   if (xmlDOMWrapNSNormAquireNormalizedNs(destDoc,
+                   if (xmlDOMWrapNSNormAcquireNormalizedNs(destDoc,
                        /* ns-decls on curElem or on destDoc->oldNs */
                        destParent ? curElem : NULL,
                        cur->ns, &ns,
@@ -9250,7 +9250,7 @@ ns_end:
                goto leave_node;
            case XML_ENTITY_REF_NODE:
                /*
-               * Remove reference to the entitity-node.
+               * Remove reference to the entity-node.
                */
                cur->content = NULL;
                cur->children = NULL;
@@ -9484,7 +9484,7 @@ xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt,
                }
                memset(clone, 0, sizeof(xmlNode));
                /*
-               * Set hierachical links.
+               * Set hierarchical links.
                */
                if (resultClone != NULL) {
                    clone->parent = parentClone;
@@ -9508,7 +9508,7 @@ xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt,
                }
                memset(clone, 0, sizeof(xmlAttr));
                /*
-               * Set hierachical links.
+               * Set hierarchical links.
                * TODO: Change this to add to the end of attributes.
                */
                if (resultClone != NULL) {
@@ -9736,9 +9736,9 @@ xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt,
            clone->ns = ns;
        } else {
            /*
-           * Aquire a normalized ns-decl and add it to the map.
+           * Acquire a normalized ns-decl and add it to the map.
            */
-           if (xmlDOMWrapNSNormAquireNormalizedNs(destDoc,
+           if (xmlDOMWrapNSNormAcquireNormalizedNs(destDoc,
                /* ns-decls on curElem or on destDoc->oldNs */
                destParent ? curElem : NULL,
                cur->ns, &ns,
@@ -9975,7 +9975,7 @@ xmlDOMWrapAdoptAttr(xmlDOMWrapCtxtPtr ctxt,
                break;
            case XML_ENTITY_REF_NODE:
                /*
-               * Remove reference to the entitity-node.
+               * Remove reference to the entity-node.
                */
                cur->content = NULL;
                cur->children = NULL;
@@ -10113,7 +10113,7 @@ xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt,
                    break;
            case XML_ENTITY_REF_NODE:
                /*
-               * Remove reference to the entitity-node.
+               * Remove reference to the entity-node.
                */
                node->content = NULL;
                node->children = NULL;
diff --git a/trio.c b/trio.c
index c8b9c84e..f7a0da66 100644
--- a/trio.c
+++ b/trio.c
@@ -2610,7 +2610,7 @@ TRIO_ARGS5((self, wstring, flags, width, precision),
  *
  *  The accuracy [...] is implementation defined, as is the accuracy
  *  of the conversion between floating-point internal representations
- *  and string representations performed by the libray routine in
+ *  and string representations performed by the library routine in
  *  <stdio.h>"
  */
 /* FIXME: handle all instances of constant long-double number (L)
@@ -5899,7 +5899,7 @@ TRIO_ARGS4((self, target, flags, width),
        }
       if (trio_equal(doubleString, NAN_UPPER))
        {
-         /* NaN must not have a preceeding + nor - */
+         /* NaN must not have a preceding + nor - */
          if (flags & FLAGS_LONGDOUBLE)
            {
              *((trio_long_double_t *)target) = trio_nan();
diff --git a/trionan.c b/trionan.c
index 6fbabb5d..530b1c0f 100644
--- a/trionan.c
+++ b/trionan.c
@@ -92,7 +92,7 @@
 
 /*
  * In ANSI/IEEE 754-1985 64-bits double format numbers have the
- * following properties (amoungst others)
+ * following properties (amongst others)
  *
  *   o FLT_RADIX == 2: binary encoding
  *   o DBL_MAX_EXP == 1024: 11 bits exponent, where one bit is used
diff --git a/uri.c b/uri.c
index 9772aafa..05d81e57 100644
--- a/uri.c
+++ b/uri.c
@@ -22,7 +22,7 @@
  * MAX_URI_LENGTH:
  *
  * The definition of the URI regexp in the above RFC has no size limit
- * In practice they are usually relativey short except for the
+ * In practice they are usually relatively short except for the
  * data URI scheme as defined in RFC 2397. Even for data URI the usual
  * maximum size before hitting random practical limits is around 64 KB
  * and 4KB is usually a maximum admitted limit for proper operations.
@@ -438,7 +438,7 @@ xmlParse3986Host(xmlURIPtr uri, const char **str)
 
     host = cur;
     /*
-     * IPv6 and future adressing scheme are enclosed between brackets
+     * IPv6 and future addressing scheme are enclosed between brackets
      */
     if (*cur == '[') {
         cur++;
@@ -1458,7 +1458,7 @@ xmlNormalizeURIPath(char *path) {
               goto done_cd;
            (out++)[0] = (cur++)[0];
        }
-       /* nomalize // */
+       /* normalize // */
        while ((cur[0] == '/') && (cur[1] == '/'))
            cur++;
 
@@ -2152,7 +2152,7 @@ done:
  *     http://site1.com/docs/pic1.gif   http://site1.com/docs/pic1.gif
  *
  *
- * Note: if the URI reference is really wierd or complicated, it may be
+ * Note: if the URI reference is really weird or complicated, it may be
  *       worthwhile to first convert it into a "nice" one by calling
  *       xmlBuildURI (using 'base') before calling this routine,
  *       since this routine (for reasonable efficiency) assumes URI has
@@ -2463,7 +2463,7 @@ path_processing:
        /* allocate space for leading '/' + path + string terminator */
        uri->path = xmlMallocAtomic(len + 2);
        if (uri->path == NULL) {
-           xmlFreeURI(uri);    /* Guard agains 'out of memory' */
+           xmlFreeURI(uri);    /* Guard against 'out of memory' */
            return(NULL);
        }
        /* Put in leading '/' plus path */
@@ -2478,7 +2478,7 @@ path_processing:
        }
        p = uri->path;
     }
-    /* Now change all occurences of '\' to '/' */
+    /* Now change all occurrences of '\' to '/' */
     while (*p != '\0') {
        if (*p == '\\')
            *p = '/';
@@ -2528,7 +2528,7 @@ xmlPathToURI(const xmlChar *path)
         return(NULL);
 #if defined(_WIN32) && !defined(__CYGWIN__)
     /* xmlCanonicPath can return an URI on Windows (is that the intended behaviour?)
-       If 'cal' is a valid URI allready then we are done here, as continuing would make
+       If 'cal' is a valid URI already then we are done here, as continuing would make
        it invalid. */
     if ((uri = xmlParseURI((const char *) cal)) != NULL) {
        xmlFreeURI(uri);
diff --git a/valid.c b/valid.c
index b1cfede2..fca3cc06 100644
--- a/valid.c
+++ b/valid.c
@@ -2640,7 +2640,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
     ret->doc = doc;
     if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
        /*
-        * Operating in streaming mode, attr is gonna disapear
+        * Operating in streaming mode, attr is gonna disappear
         */
        if (doc->dict != NULL)
            ret->name = xmlDictLookup(doc->dict, attr->name, -1);
@@ -2968,7 +2968,7 @@ xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
     ret->value = xmlStrdup(value);
     if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
        /*
-        * Operating in streaming mode, attr is gonna disapear
+        * Operating in streaming mode, attr is gonna disappear
         */
        ret->name = xmlStrdup(attr->name);
        ret->attr = NULL;
diff --git a/win32/VC10/config.h b/win32/VC10/config.h
index c1e16f14..324b74ff 100644
--- a/win32/VC10/config.h
+++ b/win32/VC10/config.h
@@ -37,7 +37,7 @@
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 /* MS C-runtime has functions which can be used in order to determine if
    a given floating-point variable contains NaN, (+-)INF. These are 
-   preferred, because floating-point technology is considered propriatary
+   preferred, because floating-point technology is considered proprietary
    by MS and we can assume that their functions know more about their 
    oddities than we do. */
 #include <float.h>
diff --git a/win32/configure.js b/win32/configure.js
index dbf238c7..e8c13ee0 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -172,7 +172,7 @@ function usage()
        WScript.Echo(txt);
 }
 
-/* Discovers the version we are working with by reading the apropriate
+/* Discovers the version we are working with by reading the appropriate
    configuration file. Despite its name, this also writes the configuration
    file included by our makefile. */
 function discoverVersion()
diff --git a/win32/wince/wincecompat.c b/win32/wince/wincecompat.c
index bd49c575..16782245 100644
--- a/win32/wince/wincecompat.c
+++ b/win32/wince/wincecompat.c
@@ -1,5 +1,5 @@
 /*
- * wincecompat.c : wince compatiblity module
+ * wincecompat.c : wince compatibility module
  *
  * See Copyright for the status of this software.
  *
diff --git a/win32/wince/wincecompat.h b/win32/wince/wincecompat.h
index aa0f3dce..51541795 100644
--- a/win32/wince/wincecompat.h
+++ b/win32/wince/wincecompat.h
@@ -1,5 +1,5 @@
 /*
- * wincecompat.h : wince compatiblity header file 
+ * wincecompat.h : wince compatibility header file 
  *
  * See Copyright for the status of this software.
  *
@@ -40,11 +40,11 @@ char *getcwd( char *buffer, unsigned int size);
 char *strerror(int errnum);
 
 /*
-       Macro'ed inexistant funtion names
+       Macro'ed nonexistent function names
 
 */
 #define snprintf _snprintf
 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
 #define perror(_t) MessageBox(NULL, _T("_t"), _T("Error/Warning"), MB_OK)
 
-#endif
\ No newline at end of file
+#endif
diff --git a/xinclude.c b/xinclude.c
index c3a1854e..ba850fa5 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -671,7 +671,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
     int i;
 
     /*
-     * Avoid recursion in already substitued resources
+     * Avoid recursion in already substituted resources
     for (i = 0;i < ctxt->urlNr;i++) {
        if (xmlStrEqual(doc->URL, ctxt->urlTab[i]))
            return;
@@ -756,7 +756,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
  * @txt:  the new text node
  * @url:  the associated URL
  *
- * Add a new txtument to the list
+ * Add a new text node to the list
  */
 static void
 xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) {
@@ -1262,7 +1262,7 @@ struct _xmlXIncludeMergeData {
  * @doc:  the including doc
  * @nr: the entity name
  *
- * Inplements the merge of one entity
+ * Implements the merge of one entity
  */
 static void
 xmlXIncludeMergeEntity(void *payload, void *vdata,
@@ -1339,7 +1339,7 @@ error:
  * @doc:  the including doc
  * @from:  the included doc
  *
- * Inplements the entity merge
+ * Implements the entity merge
  *
  * Returns 0 if merge succeeded, -1 if some processing failed
  */
@@ -1922,7 +1922,7 @@ xinclude_multibyte_fallback:
 
            cur = xmlStringCurrentChar(NULL, &content[i], &l);
            if (!IS_CHAR(cur)) {
-               /* Handle splitted multibyte char at buffer boundary */
+               /* Handle split multibyte char at buffer boundary */
                if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) {
                    xinclude_multibyte_fallback_used = 1;
                    xmlBufShrink(buf->buffer, i);
@@ -2143,7 +2143,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
        xmlNodePtr children;
 
        /*
-        * Time to try a fallback if availble
+        * Time to try a fallback if available
         */
 #ifdef DEBUG_XINCLUDE
        xmlGenericError(xmlGenericErrorContext, "error looking for fallback\n");
@@ -2188,7 +2188,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
  * @ctxt: an XInclude context
  * @nr: the node number
  *
- * Inplement the infoset replacement for the given node
+ * Implement the infoset replacement for the given node
  *
  * Returns 0 if substitution succeeded, -1 if some processing failed
  */
diff --git a/xmlIO.c b/xmlIO.c
index 3ab73398..2a1e2cb0 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -185,9 +185,9 @@ static const char *IOerr[] = {
     "already connected",       /* EISCONN */
     "connection refused",      /* ECONNREFUSED */
     "unreachable network",     /* ENETUNREACH */
-    "adddress in use",         /* EADDRINUSE */
+    "address in use",          /* EADDRINUSE */
     "already in use",          /* EALREADY */
-    "unknown address familly", /* EAFNOSUPPORT */
+    "unknown address family",  /* EAFNOSUPPORT */
 };
 
 #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
@@ -3337,7 +3337,7 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
     int nbchars = 0; /* number of chars to output to I/O */
     int ret;         /* return from function call */
     int written = 0; /* number of char written to I/O so far */
-    int chunk;       /* number of byte curreent processed from buf */
+    int chunk;       /* number of byte current processed from buf */
 
     if ((out == NULL) || (out->error)) return(-1);
     if (len < 0) return(0);
@@ -3493,7 +3493,7 @@ xmlEscapeContent(unsigned char* out, int *outlen,
  * @escaping:  an optional escaping function (or NULL)
  *
  * Write the content of the string in the output I/O buffer
- * This routine escapes the caracters and then handle the I18N
+ * This routine escapes the characters and then handle the I18N
  * transcoding from internal UTF-8
  * The buffer is lossless, i.e. will store in case of partial
  * or delayed writes.
@@ -3951,7 +3951,7 @@ xmlResolveResourceFromCatalog(const char *URL, const char *ID,
  * @ID:  the System ID for the entity to load
  * @ctxt:  the context in which the entity is called or NULL
  *
- * By default we don't load external entitites, yet.
+ * By default we don't load external entities, yet.
  *
  * Returns a new allocated xmlParserInputPtr, or NULL.
  */
diff --git a/xmllint.c b/xmllint.c
index 2bbe91d6..735d951d 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -519,7 +519,7 @@ endTimer(char *format, ...)
 #endif
 /************************************************************************
  *                                                                     *
- *                     HTML ouput                                      *
+ *                     HTML output                                     *
  *                                                                     *
  ************************************************************************/
 static char buffer[50000];
diff --git a/xmlmodule.c b/xmlmodule.c
index a95ab66a..1867a5e1 100644
--- a/xmlmodule.c
+++ b/xmlmodule.c
@@ -67,7 +67,7 @@ xmlModuleErrMemory(xmlModulePtr module, const char *extra)
  *
  * Opens a module/shared library given its name or path
  * NOTE: that due to portability issues, behaviour can only be
- * guaranteed with @name using ASCII. We canot guarantee that
+ * guaranteed with @name using ASCII. We cannot guarantee that
  * an UTF-8 string would work, which is why name is a const char *
  * and not a const xmlChar * .
  * TODO: options are not yet implemented.
@@ -109,7 +109,7 @@ xmlModuleOpen(const char *name, int options ATTRIBUTE_UNUSED)
  *
  * Lookup for a symbol address in the given module
  * NOTE: that due to portability issues, behaviour can only be
- * guaranteed with @name using ASCII. We canot guarantee that
+ * guaranteed with @name using ASCII. We cannot guarantee that
  * an UTF-8 string would work, which is why name is a const char *
  * and not a const xmlChar * .
  *
diff --git a/xmlreader.c b/xmlreader.c
index b505f16e..f3891e43 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -1111,7 +1111,7 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
     do {
        if (node->type == XML_ENTITY_REF_NODE) {
            /*
-            * Case where the underlying tree is not availble, lookup the entity
+            * Case where the underlying tree is not available, lookup the entity
             * and walk it.
             */
            if ((node->children == NULL) && (ctxt->sax != NULL) &&
@@ -1374,7 +1374,7 @@ get_next_node:
 
     /*
      * If we are not backtracking on ancestors or examined nodes,
-     * that the parser didn't finished or that we arent at the end
+     * that the parser didn't finished or that we aren't at the end
      * of stream, continue processing.
      */
     while ((reader->node != NULL) && (reader->node->next == NULL) &&
@@ -1565,7 +1565,7 @@ node_found:
        (reader->node->type == XML_ENTITY_REF_NODE) &&
        (reader->ctxt != NULL) && (reader->ctxt->replaceEntities == 1)) {
        /*
-        * Case where the underlying tree is not availble, lookup the entity
+        * Case where the underlying tree is not available, lookup the entity
         * and walk it.
         */
        if ((reader->node->children == NULL) && (reader->ctxt->sax != NULL) &&
@@ -2521,7 +2521,7 @@ xmlTextReaderGetAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName,
  * parser, set its state to End Of File and return the input stream with
  * what is left that the parser did not use.
  *
- * The implementation is not good, the parser certainly procgressed past
+ * The implementation is not good, the parser certainly progressed past
  * what's left in reader->input, and there is an allocation problem. Best
  * would be to rewrite it differently.
  *
@@ -2903,8 +2903,8 @@ xmlTextReaderMoveToElement(xmlTextReaderPtr reader) {
  *
  * Parses an attribute value into one or more Text and EntityReference nodes.
  *
- * Returns 1 in case of success, 0 if the reader was not positionned on an
- *         ttribute node or all the attribute values have been read, or -1
+ * Returns 1 in case of success, 0 if the reader was not positioned on an
+ *         attribute node or all the attribute values have been read, or -1
  *         in case of error.
  */
 int
@@ -3941,7 +3941,7 @@ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader)
  * xmlTextReaderCurrentNode:
  * @reader:  the xmlTextReaderPtr used
  *
- * Hacking interface allowing to get the xmlNodePtr correponding to the
+ * Hacking interface allowing to get the xmlNodePtr corresponding to the
  * current node being accessed by the xmlTextReader. This is dangerous
  * because the underlying node may be destroyed on the next Reads.
  *
@@ -4053,7 +4053,7 @@ xmlTextReaderPreservePattern(xmlTextReaderPtr reader, const xmlChar *pattern,
  * xmlTextReaderCurrentDoc:
  * @reader:  the xmlTextReaderPtr used
  *
- * Hacking interface allowing to get the xmlDocPtr correponding to the
+ * Hacking interface allowing to get the xmlDocPtr corresponding to the
  * current document being accessed by the xmlTextReader.
  * NOTE: as a result of this call, the reader will not destroy the
  *       associated XML document and calling xmlFreeDoc() on the result
@@ -4156,11 +4156,11 @@ xmlTextReaderValidityStructuredRelay(void *userData, xmlErrorPtr error)
  *
  * Use RelaxNG to validate the document as it is processed.
  * Activation is only possible before the first Read().
- * if @schema is NULL, then RelaxNG validation is desactivated.
+ * if @schema is NULL, then RelaxNG validation is deactivated.
  @ The @schema should not be freed until the reader is deallocated
  * or its use has been deactivated.
  *
- * Returns 0 in case the RelaxNG validation could be (des)activated and
+ * Returns 0 in case the RelaxNG validation could be (de)activated and
  *         -1 in case of error.
  */
 int
@@ -4220,7 +4220,7 @@ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) {
  *
  * Internal locator function for the readers
  *
- * Returns 0 in case the Schema validation could be (des)activated and
+ * Returns 0 in case the Schema validation could be (de)activated and
  *         -1 in case of error.
  */
 static int
@@ -4273,11 +4273,11 @@ xmlTextReaderLocator(void *ctx, const char **file, unsigned long *line) {
  *
  * Use XSD Schema to validate the document as it is processed.
  * Activation is only possible before the first Read().
- * if @schema is NULL, then Schema validation is desactivated.
- @ The @schema should not be freed until the reader is deallocated
+ * if @schema is NULL, then Schema validation is deactivated.
+ * The @schema should not be freed until the reader is deallocated
  * or its use has been deactivated.
  *
- * Returns 0 in case the Schema validation could be (des)activated and
+ * Returns 0 in case the Schema validation could be (de)activated and
  *         -1 in case of error.
  */
 int
diff --git a/xmlregexp.c b/xmlregexp.c
index 6825cd65..c119ff1f 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -2,7 +2,7 @@
  * regexp.c: generic and extensible Regular Expression engine
  *
  * Basically designed with the purpose of compiling regexps for
- * the variety of validation/shemas mechanisms now available in
+ * the variety of validation/schemas mechanisms now available in
  * XML related specifications these include:
  *    - XML-1.0 DTD validation
  *    - XML Schemas structure part 1
@@ -228,7 +228,7 @@ struct _xmlAutomataState {
     int maxTrans;
     int nbTrans;
     xmlRegTrans *trans;
-    /*  knowing states ponting to us can speed things up */
+    /*  knowing states pointing to us can speed things up */
     int maxTransTo;
     int nbTransTo;
     int *transTo;
@@ -590,7 +590,7 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) {
                targetno = stateRemap[trans->to];
                /*
                 * if the same atom can generate transitions to 2 different
-                * states then it means the automata is not determinist and
+                * states then it means the automata is not deterministic and
                 * the compact form can't be used !
                 */
                prev = transitions[stateno * (nbatoms + 1) + atomno + 1];
@@ -831,7 +831,7 @@ xmlRegFreeAtom(xmlRegAtomPtr atom) {
 /**
  * xmlRegCopyAtom:
  * @ctxt:  the regexp parser context
- * @atom:  the oiginal atom
+ * @atom:  the original atom
  *
  * Allocate a new regexp range
  *
@@ -1549,7 +1549,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
     int nullable = 0;
 
     if (atom == NULL) {
-       ERROR("genrate transition: atom == NULL");
+       ERROR("generate transition: atom == NULL");
        return(-1);
     }
     if (atom->type == XML_REGEXP_SUBREG) {
@@ -1624,7 +1624,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                    xmlRegAtomPtr copy;
                    /*
                     * duplicate a transition based on atom to count next
-                    * occurences after 1. We cannot loop to atom->start
+                    * occurrences after 1. We cannot loop to atom->start
                     * directly because we need an epsilon transition to
                     * newstate.
                     */
@@ -1657,7 +1657,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                } else {
                    /*
                     * either we need the atom at least once or there
-                    * is an atom->start0 allowing to easilly plug the
+                    * is an atom->start0 allowing to easily plug the
                     * epsilon transition.
                     */
                    counter = xmlRegGetCounter(ctxt);
@@ -1957,7 +1957,7 @@ xmlFAEliminateEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
      * Build the completed transitions bypassing the epsilons
      * Use a marking algorithm to avoid loops
      * Mark sink states too.
-     * Process from the latests states backward to the start when
+     * Process from the latest states backward to the start when
      * there is long cascading epsilon chains this minimize the
      * recursions and transition compares when adding the new ones
      */
@@ -2145,7 +2145,7 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
        } else {
            /*
             * comparing a block range with anything else is way
-            * too costly, and maintining the table is like too much
+            * too costly, and maintaining the table is like too much
             * memory too, so let's force the automata to save state
             * here.
             */
@@ -2279,7 +2279,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
     }
     switch (type1) {
         case XML_REGEXP_ANYSPACE: /* \s */
-           /* can't be a letter, number, mark, pontuation, symbol */
+           /* can't be a letter, number, mark, punctuation, symbol */
            if ((type2 == XML_REGEXP_NOTSPACE) ||
                ((type2 >= XML_REGEXP_LETTER) &&
                 (type2 <= XML_REGEXP_LETTER_OTHERS)) ||
@@ -2296,7 +2296,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
         case XML_REGEXP_NOTSPACE: /* \S */
            break;
         case XML_REGEXP_INITNAME: /* \l */
-           /* can't be a number, mark, separator, pontuation, symbol or other */
+           /* can't be a number, mark, separator, punctuation, symbol or other */
            if ((type2 == XML_REGEXP_NOTINITNAME) ||
                ((type2 >= XML_REGEXP_NUMBER) &&
                 (type2 <= XML_REGEXP_NUMBER_OTHERS)) ||
@@ -2315,7 +2315,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
         case XML_REGEXP_NOTINITNAME: /* \L */
            break;
         case XML_REGEXP_NAMECHAR: /* \c */
-           /* can't be a mark, separator, pontuation, symbol or other */
+           /* can't be a mark, separator, punctuation, symbol or other */
            if ((type2 == XML_REGEXP_NOTNAMECHAR) ||
                ((type2 >= XML_REGEXP_MARK) &&
                 (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
@@ -2332,7 +2332,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
         case XML_REGEXP_NOTNAMECHAR: /* \C */
            break;
         case XML_REGEXP_DECIMAL: /* \d */
-           /* can't be a letter, mark, separator, pontuation, symbol or other */
+           /* can't be a letter, mark, separator, punctuation, symbol or other */
            if ((type2 == XML_REGEXP_NOTDECIMAL) ||
                (type2 == XML_REGEXP_REALCHAR) ||
                ((type2 >= XML_REGEXP_LETTER) &&
@@ -2352,7 +2352,7 @@ xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
         case XML_REGEXP_NOTDECIMAL: /* \D */
            break;
         case XML_REGEXP_REALCHAR: /* \w */
-           /* can't be a mark, separator, pontuation, symbol or other */
+           /* can't be a mark, separator, punctuation, symbol or other */
            if ((type2 == XML_REGEXP_NOTDECIMAL) ||
                ((type2 >= XML_REGEXP_MARK) &&
                 (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
@@ -3575,9 +3575,9 @@ xmlRegNewExecCtxt(xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data) {
 
 /**
  * xmlRegFreeExecCtxt:
- * @exec: a regular expression evaulation context
+ * @exec: a regular expression evaluation context
  *
- * Free the structures associated to a regular expression evaulation context.
+ * Free the structures associated to a regular expression evaluation context.
  */
 void
 xmlRegFreeExecCtxt(xmlRegExecCtxtPtr exec) {
@@ -3651,7 +3651,7 @@ xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
  * @valStr:  the validation string
  *
  * Checks if both strings are equal or have the same content. "*"
- * can be used as a wildcard in @valStr; "|" is used as a seperator of
+ * can be used as a wildcard in @valStr; "|" is used as a separator of
  * substrings in both @expStr and @valStr.
  *
  * Returns 1 if the comparison is satisfied and the number of substrings
@@ -5877,8 +5877,8 @@ xmlAutomataNewNegTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  * @to: the target point of the transition or NULL
  * @token: the input string associated to that transition
  * @token2: the second input string associated to that transition
- * @min:  the minimum successive occurences of token
- * @max:  the maximum successive occurences of token
+ * @min:  the minimum successive occurrences of token
+ * @max:  the maximum successive occurrences of token
  * @data:  data associated to the transition
  *
  * If @to is NULL, this creates first a new target state in the automata
@@ -5964,8 +5964,8 @@ xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
  * @from: the starting point of the transition
  * @to: the target point of the transition or NULL
  * @token: the input string associated to that transition
- * @min:  the minimum successive occurences of token
- * @max:  the maximum successive occurences of token
+ * @min:  the minimum successive occurrences of token
+ * @max:  the maximum successive occurrences of token
  * @data:  data associated to the transition
  *
  * If @to is NULL, this creates first a new target state in the automata
@@ -6031,8 +6031,8 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  * @to: the target point of the transition or NULL
  * @token: the input string associated to that transition
  * @token2: the second input string associated to that transition
- * @min:  the minimum successive occurences of token
- * @max:  the maximum successive occurences of token
+ * @min:  the minimum successive occurrences of token
+ * @max:  the maximum successive occurrences of token
  * @data:  data associated to the transition
  *
  * If @to is NULL, this creates first a new target state in the automata
@@ -6111,8 +6111,8 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
  * @from: the starting point of the transition
  * @to: the target point of the transition or NULL
  * @token: the input string associated to that transition
- * @min:  the minimum successive occurences of token
- * @max:  the maximum successive occurences of token
+ * @min:  the minimum successive occurrences of token
+ * @max:  the maximum successive occurrences of token
  * @data:  data associated to the transition
  *
  * If @to is NULL, this creates first a new target state in the automata
@@ -7088,7 +7088,7 @@ xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
  * xmlExpIsNillable:
  * @exp: the expression
  *
- * Finds if the expression is nillable, i.e. if it accepts the empty sequqnce
+ * Finds if the expression is nillable, i.e. if it accepts the empty sequence
  *
  * Returns 1 if nillable, 0 if not and -1 in case of error
  */
@@ -7271,7 +7271,7 @@ static xmlExpNodePtr xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
  * so that sub{n} subsume exp
  *
  * Returns the multiple value if successful, 0 if it is not a multiple
- *         and -1 in case of internel error.
+ *         and -1 in case of internal error.
  */
 
 static int
@@ -7439,7 +7439,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
                return(forbiddenExp);
            }
 #ifdef DEBUG_DERIV
-           printf("Compex exp vs Atom -> Forbid\n");
+           printf("Complex exp vs Atom -> Forbid\n");
 #endif
            return(forbiddenExp);
         case XML_EXP_SEQ:
@@ -7783,7 +7783,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
  *
  * Evaluates the expression resulting from @exp consuming a sub expression @sub
  * Based on algebraic derivation and sometimes direct Brzozowski derivation
- * it usually tatkes less than linear time and can handle expressions generating
+ * it usually takes less than linear time and can handle expressions generating
  * infinite languages.
  *
  * Returns the resulting expression or NULL in case of internal error, the
@@ -7805,7 +7805,7 @@ xmlExpExpDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
     }
     if (xmlExpCheckCard(exp, sub) == 0) {
 #ifdef DEBUG_DERIV
-       printf("sub generate longuer sequances than exp : can't subsume\n");
+       printf("sub generate longer sequences than exp : can't subsume\n");
 #endif
         return(forbiddenExp);
     }
@@ -7818,7 +7818,7 @@ xmlExpExpDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
  * @exp: the englobing expression
  * @sub: the subexpression
  *
- * Check whether @exp accepts all the languages accexpted by @sub
+ * Check whether @exp accepts all the languages accepted by @sub
  * the input being a subexpression.
  *
  * Returns 1 if true 0 if false and -1 in case of failure.
@@ -7845,7 +7845,7 @@ xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
     }
     if (xmlExpCheckCard(exp, sub) == 0) {
 #ifdef DEBUG_DERIV
-       printf("sub generate longuer sequances than exp : can't subsume\n");
+       printf("sub generate longer sequences than exp : can't subsume\n");
 #endif
         return(0);
     }
diff --git a/xmlsave.c b/xmlsave.c
index bf805330..fa009153 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -1,5 +1,5 @@
 /*
- * xmlsave.c: Implemetation of the document serializer
+ * xmlsave.c: Implementation of the document serializer
  *
  * See Copyright for the status of this software.
  *
@@ -355,7 +355,7 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
 /**
  * xmlFreeSaveCtxt:
  *
- * Free a saving context, destroying the ouptut in any remaining buffer
+ * Free a saving context, destroying the output in any remaining buffer
  */
 static void
 xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt)
@@ -2588,7 +2588,7 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
  * xmlSaveFileTo:
  * @buf:  an output I/O buffer
  * @cur:  the document
- * @encoding:  the encoding if any assuming the I/O layer handles the trancoding
+ * @encoding:  the encoding if any assuming the I/O layer handles the transcoding
  *
  * Dump an XML document to an I/O buffer.
  * Warning ! This call xmlOutputBufferClose() on buf which is not available
@@ -2622,7 +2622,7 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
  * xmlSaveFormatFileTo:
  * @buf:  an output I/O buffer
  * @cur:  the document
- * @encoding:  the encoding if any assuming the I/O layer handles the trancoding
+ * @encoding:  the encoding if any assuming the I/O layer handles the transcoding
  * @format: should formatting spaces been added
  *
  * Dump an XML document to an I/O buffer.
diff --git a/xmlschemas.c b/xmlschemas.c
index 457f7d4a..d19de6df 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -22,7 +22,7 @@
  *     acquisition episode (xmlSchemaAugmentIDC).
  *
  * NOTES:
- *   - Elimated item creation for: <restriction>, <extension>,
+ *   - Eliminated item creation for: <restriction>, <extension>,
  *     <simpleContent>, <complexContent>, <list>, <union>
  *
  * PROBLEMS:
@@ -2780,8 +2780,6 @@ xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt,
 /**
  * xmlSchemaPMissingAttrErr:
  * @ctxt: the schema validation context
- * @ownerDes: the designation of  the owner
- * @ownerName: the name of the owner
  * @ownerItem: the owner as a schema object
  * @ownerElem: the owner as an element node
  * @node: the parent element node of the missing attribute node
@@ -2815,7 +2813,6 @@ xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt,
  * xmlSchemaPResCompAttrErr:
  * @ctxt: the schema validation context
  * @error: the error code
- * @ownerDes: the designation of  the owner
  * @ownerItem: the owner as a schema object
  * @ownerElem: the owner as an element node
  * @name: the name of the attribute holding the QName
@@ -2897,7 +2894,6 @@ xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt,
  * xmlSchemaPIllegalAttrErr:
  * @ctxt: the schema parser context
  * @error: the error code
- * @ownerDes: the designation of the attribute's owner
  * @ownerItem: the attribute's owner item
  * @attr: the illegal attribute node
  *
@@ -3109,7 +3105,6 @@ xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt,
  * @ctxt:  the schema validation context
  * @error: the error code
  * @type: the type specifier
- * @ownerDes: the designation of the owner
  * @ownerItem: the schema object if existent
  * @node: the validated node
  * @value: the validated value
@@ -3202,7 +3197,6 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
  * xmlSchemaPContentErr:
  * @ctxt: the schema parser context
  * @error: the error code
- * @onwerDes: the designation of the holder of the content
  * @ownerItem: the owner item of the holder of the content
  * @ownerElem: the node of the holder of the content
  * @child: the invalid child node
@@ -4307,7 +4301,7 @@ xmlSchemaAnnotDump(FILE * output, xmlSchemaAnnotPtr annot)
  * xmlSchemaContentModelDump:
  * @particle: the schema particle
  * @output: the file output
- * @depth: the depth used for intentation
+ * @depth: the depth used for indentation
  *
  * Dump a SchemaType structure
  */
@@ -5155,7 +5149,7 @@ subschemas:
  * Add an XML schema annotation declaration
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaNotationPtr
 xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
@@ -5189,10 +5183,10 @@ xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
  * @name:  the item name
  * @namespace:  the namespace
  *
- * Add an XML schema Attrribute declaration
+ * Add an XML schema Attribute declaration
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaAttributePtr
 xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
@@ -5230,10 +5224,10 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
  * @name:  the item name
  * @namespace:  the namespace
  *
- * Add an XML schema Attrribute declaration
+ * Add an XML schema Attribute declaration
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaAttributeUsePtr
 xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt,
@@ -5301,9 +5295,9 @@ xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt,
  * @nsName:  the target namespace
  * @node: the corresponding node
  *
- * Add an XML schema Attrribute Group definition.
+ * Add an XML schema Attribute Group definition.
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaAttributeGroupPtr
 xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
@@ -5355,7 +5349,7 @@ xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
  * Add an XML schema Element declaration
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaElementPtr
 xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt,
@@ -5396,7 +5390,7 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt,
  * Add an XML schema item
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaTypePtr
 xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
@@ -5493,7 +5487,7 @@ xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt)
  * Adds a schema model group
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaModelGroupPtr
 xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt,
@@ -5535,7 +5529,7 @@ xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt,
  * Adds an XML schema particle component.
  * *WARNING* this interface is highly subject to change
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaParticlePtr
 xmlSchemaAddParticle(xmlSchemaParserCtxtPtr ctxt,
@@ -5581,7 +5575,7 @@ xmlSchemaAddParticle(xmlSchemaParserCtxtPtr ctxt,
  *
  * Add an XML schema Group definition
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaModelGroupDefPtr
 xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt,
@@ -5627,7 +5621,7 @@ xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt,
  *
  * Creates a new wildcard namespace constraint.
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaWildcardNsPtr
 xmlSchemaNewWildcardNsConstraint(xmlSchemaParserCtxtPtr ctxt)
@@ -5685,7 +5679,7 @@ xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
  * Adds a wildcard.
  * It corresponds to a xsd:anyAttribute and xsd:any.
  *
- * Returns the new struture or NULL in case of error
+ * Returns the new structure or NULL in case of error
  */
 static xmlSchemaWildcardPtr
 xmlSchemaAddWildcard(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
@@ -5813,11 +5807,10 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
  * xmlSchemaPValAttrNodeQNameValue:
  * @ctxt:  a schema parser context
  * @schema: the schema context
- * @ownerDes: the designation of the parent element
  * @ownerItem: the parent as a schema object
  * @value:  the QName value
- * @local: the resulting local part if found, the attribute value otherwise
  * @uri:  the resulting namespace URI if found
+ * @local: the resulting local part if found, the attribute value otherwise
  *
  * Extracts the local name and the URI of a QName value and validates it.
  * This one is intended to be used on attribute values that
@@ -5894,11 +5887,10 @@ xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt,
  * xmlSchemaPValAttrNodeQName:
  * @ctxt:  a schema parser context
  * @schema: the schema context
- * @ownerDes: the designation of the owner element
  * @ownerItem: the owner as a schema object
  * @attr:  the attribute node
- * @local: the resulting local part if found, the attribute value otherwise
  * @uri:  the resulting namespace URI if found
+ * @local: the resulting local part if found, the attribute value otherwise
  *
  * Extracts and validates the QName of an attribute value.
  * This one is intended to be used on attribute values that
@@ -5926,12 +5918,11 @@ xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt,
  * xmlSchemaPValAttrQName:
  * @ctxt:  a schema parser context
  * @schema: the schema context
- * @ownerDes: the designation of the parent element
  * @ownerItem: the owner as a schema object
  * @ownerElem:  the parent node of the attribute
  * @name:  the name of the attribute
- * @local: the resulting local part if found, the attribute value otherwise
  * @uri:  the resulting namespace URI if found
+ * @local: the resulting local part if found, the attribute value otherwise
  *
  * Extracts and validates the QName of an attribute value.
  *
@@ -5962,11 +5953,6 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt,
 /**
  * xmlSchemaPValAttrID:
  * @ctxt:  a schema parser context
- * @schema: the schema context
- * @ownerDes: the designation of the parent element
- * @ownerItem: the owner as a schema object
- * @ownerElem:  the parent node of the attribute
- * @name:  the name of the attribute
  *
  * Extracts and validates the ID of an attribute value.
  *
@@ -6162,7 +6148,6 @@ xmlGetMinOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
 /**
  * xmlSchemaPGetBoolNodeValue:
  * @ctxt:  a schema validation context
- * @ownerDes:  owner designation
  * @ownerItem:  the owner as a schema item
  * @node: the node holding the value
  *
@@ -6253,7 +6238,7 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
 
 /************************************************************************
  *                                                                     *
- *             Shema extraction from an Infoset                        *
+ *             Schema extraction from an Infoset                       *
  *                                                                     *
  ************************************************************************/
 static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
@@ -6286,8 +6271,7 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt,
 /**
  * xmlSchemaPValAttrNodeValue:
  *
- * @ctxt:  a schema parser context
- * @ownerDes: the designation of the parent element
+ * @pctxt:  a schema parser context
  * @ownerItem: the schema object owner if existent
  * @attr:  the schema attribute node being validated
  * @value: the value
@@ -6360,7 +6344,6 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt,
  * xmlSchemaPValAttrNode:
  *
  * @ctxt:  a schema parser context
- * @ownerDes: the designation of the parent element
  * @ownerItem: the schema object owner if existent
  * @attr:  the schema attribute node being validated
  * @type: the built-in type to be validated against
@@ -6398,7 +6381,6 @@ xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt,
  *
  * @ctxt:  a schema parser context
  * @node: the element node of the attribute
- * @ownerDes: the designation of the parent element
  * @ownerItem: the schema object owner if existent
  * @ownerElem: the owner element node
  * @name:  the name of the schema attribute node
@@ -6543,7 +6525,7 @@ xmlSchemaParseLocalAttributes(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * parse a XML schema Attrribute declaration
+ * parse a XML schema Attribute declaration
  * *WARNING* this interface is highly subject to change
  *
  * Returns -1 in case of error, 0 if the declaration is improper and
@@ -6840,7 +6822,7 @@ xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt,
                    dictnsItem = xmlDictLookup(ctxt->dict, nsItem, -1);
                }
                /*
-               * Avoid dublicate namespaces.
+               * Avoid duplicate namespaces.
                */
                tmp = wildc->nsSet;
                while (tmp != NULL) {
@@ -7063,7 +7045,7 @@ xmlSchemaParseNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * parse a XML schema AnyAttrribute declaration
+ * parse a XML schema AnyAttribute declaration
  * *WARNING* this interface is highly subject to change
  *
  * Returns a wildcard or NULL.
@@ -7133,7 +7115,7 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt,
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * parse a XML schema Attrribute declaration
+ * parse a XML schema Attribute declaration
  * *WARNING* this interface is highly subject to change
  *
  * Returns the attribute declaration.
@@ -7953,7 +7935,7 @@ xmlSchemaPValAttrBlockFinal(const xmlChar *value,
     int ret = 0;
 
     /*
-    * TODO: This does not check for dublicate entries.
+    * TODO: This does not check for duplicate entries.
     */
     if ((flags == NULL) || (value == NULL))
        return (-1);
@@ -8145,7 +8127,7 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt,
  *
  * Adds the annotation to the given schema component.
  *
- * Returns the given annotaion.
+ * Returns the given annotation.
  */
 static xmlSchemaAnnotPtr
 xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem,
@@ -8240,7 +8222,7 @@ xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem,
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * Parses a XML Schema identity-contraint definition's
+ * Parses a XML Schema identity-constraint definition's
  * <selector> and <field> elements.
  *
  * Returns the parsed identity-constraint definition.
@@ -8338,7 +8320,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
  * @schema:  the schema being built
  * @node:  a subtree containing XML Schema informations
  *
- * Parses a XML Schema identity-contraint definition.
+ * Parses a XML Schema identity-constraint definition.
  *
  * Returns the parsed identity-constraint definition.
  */
@@ -9477,7 +9459,7 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt,
  *
  * Parses a XML schema model group definition.
  *
- * Note that the contraint src-redefine (6.2) can't be applied until
+ * Note that the constraint src-redefine (6.2) can't be applied until
  * references have been resolved. So we will do this at the
  * component fixup level.
  *
@@ -10185,7 +10167,7 @@ xmlSchemaParseNewDocWithContext(xmlSchemaParserCtxtPtr pctxt,
        goto exit;
     /*
     * TODO: Not nice, but I'm not 100% sure we will get always an error
-    * as a result of the obove functions; so better rely on pctxt->err
+    * as a result of the above functions; so better rely on pctxt->err
     * as well.
     */
     if ((ret == 0) && (oldErrs != pctxt->nberrors)) {
@@ -10279,7 +10261,7 @@ xmlSchemaBuildAbsoluteURI(xmlDictPtr dict, const xmlChar* location,
                          xmlNodePtr ctxtNode)
 {
     /*
-    * Build an absolue location URI.
+    * Build an absolute location URI.
     */
     if (location != NULL) {
        if (ctxtNode == NULL)
@@ -10361,7 +10343,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
     if ((type == XML_SCHEMA_SCHEMA_MAIN) || (! WXS_HAS_BUCKETS(pctxt)))
        goto doc_load;
 
-    /* Note that we expect the location to be an absulute URI. */
+    /* Note that we expect the location to be an absolute URI. */
     if (schemaLocation != NULL) {
        bkt = xmlSchemaGetSchemaBucket(pctxt, schemaLocation);
        if ((bkt != NULL) &&
@@ -10508,7 +10490,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
 
                /*
                * Chameleon include/redefine: skip loading only if it was
-               * aleady build for the targetNamespace of the including
+               * already build for the targetNamespace of the including
                * schema.
                */
                /*
@@ -10516,7 +10498,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
                * the components into the including schema and modify the
                * targetNamespace of those components, do nothing otherwise.
                * NOTE: This is currently worked-around by compiling the
-               * chameleon for every destinct including targetNamespace; thus
+               * chameleon for every distinct including targetNamespace; thus
                * not performant at the moment.
                * TODO: Check when the namespace in wildcards for chameleons
                * needs to be converted: before we built wildcard intersections
@@ -10707,7 +10689,7 @@ doc_load:
 
 exit:
     /*
-    * Return the bucket explicitely; this is needed for the
+    * Return the bucket explicitly; this is needed for the
     * main schema.
     */
     if (bucket != NULL)
@@ -12888,7 +12870,7 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
 
             ret = 1;
             /*
-             * If max and min occurances are default (1) then
+             * If max and min occurrences are default (1) then
              * simply iterate over the particles of the <sequence>.
              */
             if ((particle->minOccurs == 1) && (particle->maxOccurs == 1)) {
@@ -13047,7 +13029,7 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
                     particle->minOccurs < 1 ? 0 : particle->minOccurs - 1;
 
                 /*
-                 * use a counter to keep track of the number of transtions
+                 * use a counter to keep track of the number of transitions
                  * which went through the choice.
                  */
                 counter =
@@ -13512,7 +13494,7 @@ xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type)
  * @source: the source wildcard
  *
  * Clones the namespace constraints of source
- * and assignes them to dest.
+ * and assigns them to dest.
  * Returns -1 on internal error, 0 otherwise.
  */
 static int
@@ -13735,7 +13717,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
            */
            xmlSchemaPErr(ctxt, completeWild->node,
                XML_SCHEMAP_UNION_NOT_EXPRESSIBLE,
-               "The union of the wilcard is not expressible.\n",
+               "The union of the wildcard is not expressible.\n",
                NULL, NULL);
            return(XML_SCHEMAP_UNION_NOT_EXPRESSIBLE);
        } else if ((!nsFound) && (!absentFound)) {
@@ -13972,7 +13954,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt,
        (curWild->negNsSet->value != NULL)) {
 
        xmlSchemaPErr(ctxt, completeWild->node, XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE,
-           "The intersection of the wilcard is not expressible.\n",
+           "The intersection of the wildcard is not expressible.\n",
            NULL, NULL);
        return(XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE);
     }
@@ -14443,7 +14425,7 @@ xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
  * Builds the wildcard and the attribute uses on the given complex type.
  * Returns -1 if an internal error occurs, 0 otherwise.
  *
- * ATTENTION TODO: Experimantally this uses pointer comparisons for
+ * ATTENTION TODO: Experimentally this uses pointer comparisons for
  * strings, so recheck this if we start to hardcode some schemata, since
  * they might not be in the same dict.
  * NOTE: It is allowed to "extend" the xs:anyType type.
@@ -14643,7 +14625,7 @@ exit_failure:
  * Evaluates if a type definition contains the given "final".
  * This does take "finalDefault" into account as well.
  *
- * Returns 1 if the type does containt the given "final",
+ * Returns 1 if the type does contain the given "final",
  * 0 otherwise.
  */
 static int
@@ -14683,7 +14665,7 @@ xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type)
  * Schema Component Constraint: Effective Total Range
  * (all and sequence) + (choice)
  *
- * Returns the minimun Effective Total Range.
+ * Returns the minimum Effective Total Range.
  */
 static int
 xmlSchemaGetParticleTotalRangeMin(xmlSchemaParticlePtr particle)
@@ -14827,12 +14809,12 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle)
  * @actxt: a context
  * @type:  the derived simple type definition
  * @baseType:  the base type definition
- * @subset: the subset of ('restriction', ect.)
+ * @subset: the subset of ('restriction', etc.)
  *
  * Schema Component Constraint:
  * Type Derivation OK (Simple) (cos-st-derived-OK)
  *
- * Checks wheter @type can be validly
+ * Checks whether @type can be validly
  * derived from @baseType.
  *
  * Returns 0 on success, an positive error code otherwise.
@@ -14845,7 +14827,7 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
 {
     /*
     * 1 They are the same type definition.
-    * TODO: The identy check might have to be more complex than this.
+    * TODO: The identity check might have to be more complex than this.
     */
     if (type == baseType)
        return (0);
@@ -15055,7 +15037,7 @@ xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt,
  * @ctxt:  the parser context
  * @name:  the name
  *
- * Resolvese type definition references
+ * Resolves type definition references
  */
 static void
 xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef,
@@ -16132,7 +16114,7 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
  * Calls:
  * Type Derivation OK (Simple) AND Type Derivation OK (Complex)
  *
- * Checks wheter @type can be validly derived from @baseType.
+ * Checks whether @type can be validly derived from @baseType.
  *
  * Returns 0 on success, an positive error code otherwise.
  */
@@ -16265,7 +16247,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt,
        * if created the type via a schema construction API.
        */
        if (base->attributeWildcard != NULL) {
-           if (type->attributeWilcard == NULL) {
+           if (type->attributeWildcard == NULL) {
                xmlChar *str = NULL;
 
                xmlSchemaCustomErr(ACTXT_CAST pctxt,
@@ -16494,7 +16476,7 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
            * the {content type} is validly derived given the empty
            * set as defined in Type Derivation OK (Simple) ($3.14.6)."
            *
-           * ATTENTION TODO: This seems not needed if the type implicitely
+           * ATTENTION TODO: This seems not needed if the type implicitly
            * derived from the base type.
            *
            */
@@ -17719,7 +17701,7 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt,
     *
     * *Patterns*: won't be add here, since they are ORed at
     * type level and ANDed at ancestor level. This will
-    * happed during validation by walking the base axis
+    * happen during validation by walking the base axis
     * of the type.
     */
     for (cur = base->facetSet; cur != NULL; cur = cur->next) {
@@ -18319,7 +18301,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
                    WXS_BASIC_CAST type, NULL,
                    "Internal error: xmlSchemaTypeFixup, "
                    "complex type '%s': the <simpleContent><restriction> "
-                   "is missing a <simpleType> child, but was not catched "
+                   "is missing a <simpleType> child, but was not caught "
                    "by xmlSchemaCheckSRCCT()", type->name);
                goto exit_failure;
            }
@@ -18332,7 +18314,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
            if (baseType->contentTypeDef == NULL) {
                /*
                * TODO: Check if this ever happens. xmlSchemaCheckSRCCT
-               * should have catched this already.
+               * should have caught this already.
                */
                xmlSchemaPCustomErr(pctxt,
                    XML_SCHEMAP_INTERNAL,
@@ -18575,7 +18557,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
                    * NOTE that, although we miss to add an intermediate
                    * <sequence>, this should produce no difference to
                    * neither the regex compilation of the content model,
-                   * nor to the complex type contraints.
+                   * nor to the complex type constraints.
                    */
                    particle->children->children =
                        (xmlSchemaTreeItemPtr) baseType->subtypes;
@@ -19000,7 +18982,7 @@ xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item,
            * is defined for model groups but not definitions, but since
            * there cannot be any circular model groups without a model group
            * definition (if not using a construction API), we check those
-           * defintions only.
+           * definitions only.
            */
            xmlSchemaPCustomErr(ctxt,
                XML_SCHEMAP_MG_PROPS_CORRECT_2,
@@ -19073,7 +19055,7 @@ xmlSchemaModelGroupToModelGroupDefFixup(
  * This one is intended to be used by
  * xmlSchemaCheckAttrGroupCircular only.
  *
- * Returns the circular attribute grou reference, otherwise NULL.
+ * Returns the circular attribute group reference, otherwise NULL.
  */
 static xmlSchemaQNameRefPtr
 xmlSchemaCheckAttrGroupCircularRecur(xmlSchemaAttributeGroupPtr ctxtGr,
@@ -19187,7 +19169,7 @@ xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
  * @list: the attribute uses
  *
  * Substitutes contained attribute group references
- * for their attribute uses. Wilcards are intersected.
+ * for their attribute uses. Wildcards are intersected.
  * Attribute use prohibitions are removed from the list
  * and returned via the @prohibs list.
  * Pointlessness of attr. prohibs, if a matching attr. decl
@@ -19361,7 +19343,7 @@ xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
  * {attribute wildcard} property
  *
  * Substitutes contained attribute group references
- * for their attribute uses. Wilcards are intersected.
+ * for their attribute uses. Wildcards are intersected.
  */
 static int
 xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
@@ -19384,7 +19366,7 @@ xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
  * @attrGr:  the attribute group definition
  *
  * Substitutes contained attribute group references
- * for their attribute uses. Wilcards are intersected.
+ * for their attribute uses. Wildcards are intersected.
  *
  * Schema Component Constraint:
  *    Attribute Group Definition Properties Correct (ag-props-correct)
@@ -19520,8 +19502,8 @@ xmlSchemaResolveAttrGroupReferences(xmlSchemaQNameRefPtr ref,
  *    Attribute Declaration Properties Correct (a-props-correct)
  *
  * Validates the value constraints of an attribute declaration/use.
- * NOTE that this needs the simle type definitions to be already
- *   builded and checked.
+ * NOTE that this needs the simple type definitions to be already
+ *   built and checked.
  */
 static int
 xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
@@ -20508,7 +20490,7 @@ xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
        *   it's not clear if the referenced component needs to originate
        *   from the <redefine>d schema _document_ or the schema; the latter
        *   would include all imported and included sub-schemas of the
-       *   <redefine>d schema. Currenlty we latter approach is used.
+       *   <redefine>d schema. Currently the latter approach is used.
        *   SUPPLEMENT: It seems that the WG moves towards the latter
        *   approach, so we are doing it right.
        *
@@ -20623,8 +20605,8 @@ xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
                    * This is the complicated case: we need
                    * to apply src-redefine (7.2.2) at a later
                    * stage, i.e. when attribute group references
-                   * have beed expanded and simple types have
-                   * beed fixed.
+                   * have been expanded and simple types have
+                   * been fixed.
                    */
                    redef->target = prev;
                }
@@ -20999,7 +20981,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
     * 1. the base axis of type definitions
     * 2. nested model group definitions
     * 3. nested attribute group definitions
-    * TODO: check for circual substitution groups.
+    * TODO: check for circular substitution groups.
     */
     for (i = 0; i < nbItems; i++) {
        item = items[i];
@@ -21080,7 +21062,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
        goto exit_error;
     /*
     * First compute the variety of simple types. This is needed as
-    * a seperate step, since otherwise we won't be able to detect
+    * a separate step, since otherwise we won't be able to detect
     * circular union types in all cases.
     */
     for (i = 0; i < nbItems; i++) {
@@ -21142,7 +21124,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
     * At this point we need build and check all simple types.
     */
     /*
-    * Apply contraints for attribute declarations.
+    * Apply constraints for attribute declarations.
     */
     for (i = 0; i < nbItems; i++) {
        item = items[i];
@@ -21207,7 +21189,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
        goto exit_error;
 
     /*
-    * Complex types are builded and checked.
+    * Complex types are built and checked.
     */
     for (i = 0; i < nbItems; i++) {
        item = con->pending->items[i];
@@ -21324,7 +21306,7 @@ exit:
  * @ctxt:  a schema validation context
  *
  * parse a schema definition resource and build an internal
- * XML Shema struture which can be used to validate instances.
+ * XML Schema structure which can be used to validate instances.
  *
  * Returns the internal XML Schema structure built from the resource or
  *         NULL in case of error
@@ -21426,7 +21408,7 @@ exit:
 exit_failure:
     /*
     * Quite verbose, but should catch internal errors, which were
-    * not communitated.
+    * not communicated.
     */
     if (mainSchema) {
         xmlSchemaFree(mainSchema);
@@ -21893,7 +21875,7 @@ xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt,
        if ((vctxt->inode->node == NULL) ||
            (vctxt->inode->node->doc == NULL)) {
            VERROR_INT("xmlSchemaLookupNamespace",
-               "no node or node's doc avaliable");
+               "no node or node's doc available");
            return (NULL);
        }
        ns = xmlSearchNs(vctxt->inode->node->doc,
@@ -22106,7 +22088,7 @@ xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt,
                               xmlSchemaPSVIIDCNodePtr item)
 {
     /*
-    * Add to gobal list.
+    * Add to global list.
     */
     if (vctxt->idcNodes == NULL) {
        vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *)
@@ -22147,7 +22129,7 @@ xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt,
                     xmlSchemaPSVIIDCKeyPtr key)
 {
     /*
-    * Add to gobal list.
+    * Add to global list.
     */
     if (vctxt->idcKeys == NULL) {
        vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *)
@@ -22804,7 +22786,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt,
                VERROR(XML_SCHEMAV_CVC_IDC,
                    WXS_BASIC_CAST sto->matcher->aidc->def,
                    "Warning: No precomputed value available, the value "
-                   "was either invalid or something strange happend");
+                   "was either invalid or something strange happened");
                sto->nbHistory--;
                goto deregister_check;
            } else {
@@ -22825,7 +22807,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt,
                *   <bar>
                 * </scope>
                *
-               * The size of the list is only dependant on the depth of
+               * The size of the list is only dependent on the depth of
                * the tree.
                * An entry will be NULLed in selector_leave, i.e. when
                * we hit the target's
@@ -24120,7 +24102,7 @@ xmlSchemaClearElemInfo(xmlSchemaValidCtxtPtr vctxt,
  * @vctxt: the schema validation context
  *
  * Creates/reuses and initializes the element info item for
- * the currect tree depth.
+ * the current tree depth.
  *
  * Returns the element info item or NULL on API or internal errors.
  */
@@ -24393,7 +24375,7 @@ pattern_and_enum:
                found = 1;
                /*
                * NOTE that for patterns, @value needs to be the
-               * normalized vaule.
+               * normalized value.
                */
                ret = xmlRegexpExec(facetLink->facet->regexp, value);
                if (ret == 1)
@@ -24930,7 +24912,7 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt,
     else {
        const xmlChar *nsName = NULL, *local = NULL;
        /*
-       * TODO: We should report a *warning* that the type was overriden
+       * TODO: We should report a *warning* that the type was overridden
        * by the instance.
        */
        ACTIVATE_ATTRIBUTE(iattr);
@@ -26349,7 +26331,7 @@ default_psvi:
                    XML_SCHEMA_ELEM_INFO_HAS_ELEM_CONTENT) {
                ret = XML_SCHEMAV_CVC_ELT_5_2_2_1;
                VERROR(ret, NULL,
-                   "The content must not containt element nodes since "
+                   "The content must not contain element nodes since "
                    "there is a fixed value constraint");
                goto end_elem;
            } else {
@@ -26556,7 +26538,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
     if (ptype->builtInType == XML_SCHEMAS_ANYTYPE) {
        /*
        * Workaround for "anyType": we have currently no content model
-       * assigned for "anyType", so handle it explicitely.
+       * assigned for "anyType", so handle it explicitly.
        * "anyType" has an unbounded, lax "any" wildcard.
        */
        vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema,
@@ -26631,7 +26613,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
                return (-1);
            }
            /*
-           * Safety belf for evaluation if the cont. model was already
+           * Safety belt for evaluation if the cont. model was already
            * examined to be invalid.
            */
            if (pielem->flags & XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT) {
@@ -28820,7 +28802,7 @@ xmlSchemaValidateSetLocator(xmlSchemaValidCtxtPtr vctxt,
  *
  * Internal locator function for the readers
  *
- * Returns 0 in case the Schema validation could be (des)activated and
+ * Returns 0 in case the Schema validation could be (de)activated and
  *         -1 in case of error.
  */
 static int
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index e49ef61a..7503f905 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -70,7 +70,7 @@ struct _xmlSchemaValDate {
     unsigned int       hour    :5;     /* 0 <=  hour   <= 24   */
     unsigned int       min     :6;     /* 0 <=  min    <= 59   */
     double             sec;
-    unsigned int       tz_flag :1;     /* is tzo explicitely set? */
+    unsigned int       tz_flag :1;     /* is tzo explicitly set? */
     signed int         tzo     :12;    /* -1440 <= tzo <= 1440;
                                           currently only -840 to +840 are needed */
 };
@@ -2130,7 +2130,7 @@ xmlSchemaParseUInt(const xmlChar **str, unsigned long *llo,
  * @value: the value to check
  * @val:  the return computed value
  * @node:  the node containing the value
- * flags:  flags to control the vlidation
+ * flags:  flags to control the validation
  *
  * Check that a value conforms to the lexical space of the atomic type.
  * if true a value is computed and returned in @val.
@@ -2155,7 +2155,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
         return (-1);
 
     /*
-     * validating a non existant text node is similar to validating
+     * validating a non existent text node is similar to validating
      * an empty one.
      */
     if (value == NULL)
@@ -3067,7 +3067,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                  * following cases can arise: (1) the final quantum of
                  * encoding input is an integral multiple of 24 bits; here,
                  * the final unit of encoded output will be an integral
-                 * multiple ofindent: Standard input:701: Warning:old style
+                 * multiple of indent: Standard input:701: Warning:old style
                 * assignment ambiguity in "=*".  Assuming "= *" 4 characters
                 * with no "=" padding, (2) the final
                  * quantum of encoding input is exactly 8 bits; here, the
diff --git a/xmlwriter.c b/xmlwriter.c
index b5cd171f..58ffab63 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -801,7 +801,7 @@ xmlTextWriterStartComment(xmlTextWriterPtr writer)
  * xmlTextWriterEndComment:
  * @writer:  the xmlTextWriterPtr
  *
- * End the current xml coment.
+ * End the current xml comment.
  *
  * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
  */
diff --git a/xpath.c b/xpath.c
index 9e29f4a1..a1c7db07 100644
--- a/xpath.c
+++ b/xpath.c
@@ -343,7 +343,7 @@ xmlXPathCmpNodesExt(xmlNodePtr node1, xmlNodePtr node2) {
     }
 
     /*
-     * Speedup using document order if availble.
+     * Speedup using document order if available.
      */
     if ((node1->type == XML_ELEMENT_NODE) &&
        (node2->type == XML_ELEMENT_NODE) &&
@@ -411,7 +411,7 @@ turtle_comparison:
     if (node1 == node2->next)
        return(-1);
     /*
-     * Speedup using document order if availble.
+     * Speedup using document order if available.
      */
     if ((node1->type == XML_ELEMENT_NODE) &&
        (node2->type == XML_ELEMENT_NODE) &&
@@ -435,7 +435,7 @@ turtle_comparison:
 #endif /* XP_OPTIMIZED_NON_ELEM_COMPARISON */
 
 /*
- * Wrapper for the Timsort argorithm from timsort.h
+ * Wrapper for the Timsort algorithm from timsort.h
  */
 #ifdef WITH_TIM_SORT
 #define SORT_NAME libxml_domnode
@@ -2254,7 +2254,7 @@ xmlXPathFreeCache(xmlXPathContextCachePtr cache)
  *
  * @ctxt:  the XPath context
  * @active: enables/disables (creates/frees) the cache
- * @value: a value with semantics dependant on @options
+ * @value: a value with semantics dependent on @options
  * @options: options (currently only the value 0 is used)
  *
  * Creates/frees an object cache on the XPath context.
@@ -2414,7 +2414,7 @@ xmlXPathCacheNewNodeSet(xmlXPathContextPtr ctxt, xmlNodePtr val)
        {
            xmlXPathObjectPtr ret;
            /*
-           * Use the nodset-cache.
+           * Use the nodeset-cache.
            */
            ret = (xmlXPathObjectPtr)
                cache->nodesetObjs->items[--cache->nodesetObjs->number];
@@ -3348,7 +3348,7 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
        return(-1);
 
     /*
-     * Speedup using document order if availble.
+     * Speedup using document order if available.
      */
     if ((node1->type == XML_ELEMENT_NODE) &&
        (node2->type == XML_ELEMENT_NODE) &&
@@ -3411,7 +3411,7 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
     if (node1 == node2->next)
        return(-1);
     /*
-     * Speedup using document order if availble.
+     * Speedup using document order if available.
      */
     if ((node1->type == XML_ELEMENT_NODE) &&
        (node2->type == XML_ELEMENT_NODE) &&
@@ -3827,7 +3827,7 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
        *  xmlXPathNodeSetDupNs() to the set; thus a pure
        *  memcpy is not possible.
        *  If there was a flag on the nodesetval, indicating that
-       *  some temporary nodes are in, that would be helpfull.
+       *  some temporary nodes are in, that would be helpful.
        */
        /*
        * Optimization: Create an equally sized node-set
@@ -5887,7 +5887,7 @@ xmlXPathCastToNumber(xmlXPathObjectPtr val) {
        return(NAN);
     switch (val->type) {
     case XPATH_UNDEFINED:
-#ifdef DEGUB_EXPR
+#ifdef DEBUG_EXPR
        xmlGenericError(xmlGenericErrorContext, "NUMBER: undefined\n");
 #endif
        ret = NAN;
@@ -8549,7 +8549,7 @@ xmlXPathGetElementsByIds (xmlDocPtr doc, const xmlChar *ids) {
             * We used to check the fact that the value passed
             * was an NCName, but this generated much troubles for
             * me and Aleksey Sanin, people blatantly violated that
-            * constaint, like Visa3D spec.
+            * constraint, like Visa3D spec.
             * if (xmlValidateNCName(ID, 1) == 0)
             */
            attr = xmlGetID(doc, ID);
@@ -11867,7 +11867,7 @@ xmlXPathIsPositionalPredicate(xmlXPathParserContextPtr ctxt,
     * 1) For predicates (XPATH_OP_PREDICATE):
     *    - an inner predicate operator
     * 2) For filters (XPATH_OP_FILTER):
-    *    - an inner filter operater OR
+    *    - an inner filter operator OR
     *    - an expression selecting the node set.
     *      E.g. "key('a', 'b')" or "(//foo | //bar)".
     */
@@ -12484,7 +12484,7 @@ error:
     xmlXPathReleaseObject(xpctxt, obj);
 
     /*
-    * Ensure we return at least an emtpy set.
+    * Ensure we return at least an empty set.
     */
     if (outSeq == NULL) {
        if ((seq != NULL) && (seq->nodeNr == 0))
@@ -12569,11 +12569,11 @@ xmlXPathCompOpEvalFirst(xmlXPathParserContextPtr ctxt,
                  * limit tree traversing to first node in the result
                  */
                /*
-               * OPTIMIZE TODO: This implicitely sorts
+               * OPTIMIZE TODO: This implicitly sorts
                *  the result, even if not needed. E.g. if the argument
                *  of the count() function, no sorting is needed.
                * OPTIMIZE TODO: How do we know if the node-list wasn't
-               *  aready sorted?
+               *  already sorted?
                */
                if (ctxt->value->nodesetval->nodeNr > 1)
                    xmlXPathNodeSetSort(ctxt->value->nodesetval);
@@ -13190,7 +13190,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
                    *  will result in an ordered list if we have an
                    *  XPATH_OP_FILTER?
                    *  What about an additional field or flag on
-                   *  xmlXPathObject like @sorted ? This way we wouln'd need
+                   *  xmlXPathObject like @sorted ? This way we wouldn't need
                    *  to assume anything, so it would be more robust and
                    *  easier to optimize.
                    */
diff --git a/xpointer.c b/xpointer.c
index 04674113..c1732a58 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -27,7 +27,7 @@
  *       be parsed beforehand instead of a progressive evaluation
  * TODO: Access into entities references are not supported now ...
  *       need a start to be able to pop out of entities refs since
- *       parent is the endity declaration, not the ref.
+ *       parent is the entity declaration, not the ref.
  */
 
 #include <string.h>
@@ -1186,7 +1186,7 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) {
 static void
 xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) {
     /*
-     * XPointer don't allow by syntax to address in mutirooted trees
+     * XPointer don't allow by syntax to address in multirooted trees
      * this might prove useful in some cases, warn about it.
      */
     if ((name == NULL) && (CUR == '/') && (NXT(1) != '1')) {
diff --git a/xzlib.c b/xzlib.c
index 0ba88cfa..9a347385 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -1,5 +1,5 @@
 /**
- * xzlib.c: front end for the transparent suport of lzma compression
+ * xzlib.c: front end for the transparent support of lzma compression
  *          at the I/O layer, based on an example file from lzma project
  *
  * See Copyright for the status of this software.
@@ -71,7 +71,7 @@ typedef struct {
     int err;                    /* error code */
     char *msg;                  /* error message */
     /* lzma stream */
-    int init;                   /* is the iniflate stream initialized */
+    int init;                   /* is the inflate stream initialized */
     lzma_stream strm;           /* stream structure in-place (not a pointer) */
     char padding1[32];          /* padding allowing to cope with possible
                                    extensions of above structure without
diff --git a/xzlib.h b/xzlib.h
index 29ba55e7..7b1df15c 100644
--- a/xzlib.h
+++ b/xzlib.h
@@ -1,5 +1,5 @@
 /**
- * xzlib.h: header for the front end for the transparent suport of lzma
+ * xzlib.h: header for the front end for the transparent support of lzma
  *          compression at the I/O layer
  *
  * See Copyright for the status of this software.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]