• Home
  • Raw
  • Download

Lines Matching +full:- +full:wno +full:- +full:invalid +full:- +full:source +full:- +full:encoding

1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
14 <h1 style="text-align: center">libxml, a.k.a. gnome-xml</h1>
19 style="text-align: right; font-style: italic; font-size: 10pt">"Programming
26 under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
30 well-known markup language. Though the library is written in C <a
42 href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
44 href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
47 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
58 <li>ISO-8859-x encodings, as well as <a
59 href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
60 and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
61 [UTF-16] Unicode encodings, and more if using iconv support</li>
64 …href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/…
66 href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
68 href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
69 <li>Relax NG, ISO/IEC 19757-2:2003, <a
70 …href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/…
72 href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
74 <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
81 href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
88 href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
91 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
93 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
100 href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
112 implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
117 <p> Hosting sponsored by <a href="http://www.aoemedia.de/opensource-cms.html"
118 >Open Source CMS services</a> from AOE media.</p>
127 href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based
153 href="http://www.opensource.org/licenses/mit-license.html">MIT
159 Gnome-1.X library requiring it, <strong><span
160 style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use
177 href="http://www.opensource.org/licenses/mit-license.html">MIT
183 made to libxml, but it would be graceful to send-back bug fixes and
191 <li><strong><span style="background-color: #FF0000">Do Not Use
199 safer way for end-users to use libxml.</p>
216 href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>
218 href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>
221 libxml2(-devel)</li>
233 <p>The most generic solution is to re-fetch the latest src.rpm , and
235 <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
237 providing the shared libs and xmllint, and the other one, the -devel
247 <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p>
248 <p><code>cd libxml-xxxx</code></p>
249 <p><code>./configure --help</code></p>
264 <li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
266 <li>iconv: a powerful character encoding conversion library. It is
272 library</a> which source can be found <a
283 in make. Try using GNU-make instead.</p>
289 <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
291 <li><em>I have troubles when running make tests with gcc-3.0</em>
292 <p>It seems the initial release of gcc-3.0 has a problem with the
303 <code>xml2-config</code> which is installed as part of libxml2 usual
305 <p><code>xml2-config --cflags</code></p>
307 <p><code>xml2-config --libs</code></p>
310 <p><code>CFLAGS=`xml2-config --cflags`</code></p>
311 <p><code>LIBS=`xml2-config --libs`</code></p>
323 <li>configure the library using the "<code>--prefix</code>" switch,
326 <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
346 <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
348 /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
368 href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault
370 href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile
388 pnode=pxmlDoc-&gt;children-&gt;children;</pre>
390 <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
398 href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
401 mixed-content in the document.</p>
413 <p>The source code you are using has been <a
416 libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
435 <li>check more deeply the <a href="html/libxml-lib.html">existing
443 the libxml2 source</a> , I try to write code as clean and documented
468 href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a>
474 dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
476 doc-&gt;intSubset = dtd;
477 if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
478 else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd);
482 <p>It is a null terminated sequence of utf-8 characters. And only utf-8!
483 You need to convert strings encoded in different ways to utf-8 before
494 <p>There are several on-line resources related to using libxml:</p>
499 <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
501 <li>Look at the documentation about <a href="encoding.html">libxml
511 href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">some nice
514 href="http://www-106.ibm.com/developerworks/library/l-gnome3/">an article
522 href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li>
537 mailing-list for archival).</p>
539 <p>There is also a mailing-list <a
541 href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a
553 note that <span style="color: #FF0000; background-color: #FFFFFF">emails with
555 they contain</span> are <strong>NOT</strong> acceptable for the mailing-list,
575 programs found in source in the distribution.</li>
592 others" and is not welcome. I will automatically Carbon-Copy the
609 provide the answer. I usually send source samples when answering libxml2
611 href="http://xmlsoft.org/html/book1.html">auto-generated documentation</a> is
618 subscribe to the mailing-list as explained before, check the <a
635 fix will fit in nicely :-)</li>
647 href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
658 href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>, the source RPM will compile on
670 <li>The HP-UX porting center provides <a
671 href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li>
683 … href="ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz">libxml2-git-snapshot.tar.gz</a>.</li>
685 href="ftp://xmlsoft.org/libxml2/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
715 CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression (Nick Wellnhofer),<br/>
716 CVE-2018-14404 Fix nullptr deref with XPath logic ops (Nick Wellnhofer),<br/>
727 Merge branch 'patch-2' into 'master' (Nick Wellnhofer),<br/>
730 NaN and Inf fixes for pre-C99 compilers (Nick Wellnhofer)<br/>
739 Fix HTML serialization with UTF-8 encoding (Nick Wellnhofer),<br/>
744 Reset HTML parser input pointers on encoding failure (Nick Wellnhofer),<br/>
745 Don't run icu_parse_test if EUC-JP is unsupported (Nick Wellnhofer),<br/>
759 add --relative to testURI (Thomas Holder),<br/>
763 Add compile and libxml2-config.cmake to .gitignore (Nikolai Weibull),<br/>
764 Stop using doc-&gt;charset outside parser code (Nick Wellnhofer),<br/>
765 Add newlines to 'xmllint --xpath' output (Nick Wellnhofer),<br/>
768 Don't instruct user to run make when autogen.sh failed (林博仁(Buo-ren Lin)),<br/>
786 Revert "Compile testapi with -Wno-unused-function" (Nick Wellnhofer)<br/>
791 Halt parser in case of encoding error (Nick Wellnhofer),<br/>
794 Fix buffer over-read in xmlParseNCNameComplex (Nick Wellnhofer),<br/>
797 Fix -Wenum-compare warnings (Nick Wellnhofer),<br/>
810 Disable pointer-overflow UBSan checks under Travis (Nick Wellnhofer),<br/>
813 Run Travis tests with -Werror (Nick Wellnhofer),<br/>
814 Build with "-Wall -Wextra" (Nick Wellnhofer),<br/>
815 Fix -Wtautological-pointer-compare warnings (Nick Wellnhofer),<br/>
818 Fix -Wmisleading-indentation warnings (Nick Wellnhofer),<br/>
821 Simplify XPath NaN, inf and -0 handling (Nick Wellnhofer),<br/>
824 Compile testapi with -Wno-unused-function (Nick Wellnhofer)<br/>
837 Fix pointer comparison warnings on 64-bit Windows (J. Peter Mugaas),<br/>
839 Default to native threads on MinGW-w64 (Nick Wellnhofer),<br/>
844 Fix pointer/int cast warnings on 64-bit Windows (Nick Wellnhofer),<br/>
858 Fix -Wimplicit-fallthrough warnings (J. Peter Mugaas),<br/>
881 Handle more invalid entity values in recovery mode (Nick Wellnhofer),<br/>
896 Fix handling of parameter-entity references (Nick Wellnhofer),<br/>
898 Fix XPointer paths beginning with range-to (Nick Wellnhofer)<br/>
909 Porting libxml2 on zOS encoding of code (Stéphane Michaut),<br/>
911 relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers (Chun-wei Fan)<br/>
918 Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup (David Kilzer),<br/>
926 Fix invalid-source-encoding warnings in testWriter.c (Nick Wellnhofer),<br/>
929 Fix copy-paste errors in error messages (Nick Wellnhofer),<br/>
932 Reset parser input pointers on encoding failure (Nick Wellnhofer),<br/>
964 Fix NULL pointer deref in XPointer range-to (Nick Wellnhofer)<br/>
973 Deduplicate code in encoding.c (Nick Wellnhofer),<br/>
978 Fix empty-body warning in nanohttp.c (Nick Wellnhofer),<br/>
979 Fix cast-align warnings (Nick Wellnhofer),<br/>
980 Fix unused-parameter warnings (Nick Wellnhofer),<br/>
982 Don't switch encoding for internal parameter entities (Nick Wellnhofer),<br/>
985 Support catalog and threads tests under --without-sax1 (Nick Wellnhofer),<br/>
999 Avoid out-of-bound array access in API tests (Nick Wellnhofer),<br/>
1022 Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde),<br/>
1023 Heap-based buffer-underreads due to xmlParseName (David Kilzer),<br/>
1024 Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde),<br/>
1025 Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde),<br/>
1027 Detect change of encoding when parsing HTML names (Hugh Davenport),<br/>
1029 …Bug 759398: Heap use-after-free in xmlDictComputeFastKey &lt;https://bugzilla.gnome.org/show_bug.c…
1030 …Bug 758605: Heap-based buffer overread in xmlDictAddString &lt;https://bugzilla.gnome.org/show_bug…
1031 …Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal &lt;https://bugzilla.g…
1032 …Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup &lt;https://bugzilla.gnome.org/show_bug…
1037 Fix typo: s{ ec -&gt; cr }cipt (Jan Pokorný),<br/>
1038 Fix typos: dictio{ nn -&gt; n }ar{y,ies} (Jan Pokorný),<br/>
1039 Fix typos: PATH_{ SEAPARATOR -&gt; SEPARATOR } (Jan Pokorný),<br/>
1046 libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger),<br/>
1048 Use pkg-config to locate zlib when possible (Stewart Brodie),<br/>
1049 Use pkg-config to locate ICU when possible (Stewart Brodie),<br/>
1055 os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat),<br/>
1058 os400: compile and install program xmllint (qshell-only). (Patrick Monnerat),<br/>
1065 Add xz to xml2-config --libs output (Baruch Siach),<br/>
1066 …Bug 760190: configure.ac should be able to build --with-icu without icu-config tool &lt;https://bu…
1075 …Bug 763071: heap-buffer-overflow in xmlStrncat &lt;https://bugzilla.gnome.org/show_bug.cgi?id=7630…
1089 Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer),<br/>
1090 Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht),<br/>
1092 …Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd &lt;h…
1093 error.c: *input-&gt;cur == 0 does not mean no error (Pavel Raiskup),<br/>
1095 …183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte ch…
1097 …Bug 721158: Missing ICU string when doing --version on xmllint &lt;https://bugzilla.gnome.org/show…
1100 Heap-based buffer overread in xmlNextChar (Daniel Veillard)<br/>
1105 Implement "runtest -u" mode (David Kilzer),<br/>
1112 CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),<br/>
1113 CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),<br/>
1114 CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),<br/>
1115 CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),<br/>
1116 CVE-2015-5312 Another entity expansion issue (David Drysdale),<br/>
1117 CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),<br/>
1118 CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),<br/>
1119 CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),<br/>
1120 CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),<br/>
1121 CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),<br/>
1122 CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)<br/>
1123 CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),<br/>
1124 CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),<br/>
1129 Fix a small error in xmllint --format description (Fabien Degomme),<br/>
1150 Fail parsing early on if encoding conversion failed (Daniel Veillard),<br/>
1151 Do not process encoding values if the declaration if broken (Daniel Veillard),<br/>
1152 Silence clang's -Wunknown-attribute (Michael Catanzaro),<br/>
1153 xmlMemUsed is not thread-safe (Martin von Gagern),<br/>
1156 Allow attributes on descendant-or-self axis (Nick Wellnhofer),<br/>
1162 Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),<br/>
1170 Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),<br/>
1175 libxml2-config.cmake.in: update include directories (Samuel Martin),<br/>
1185 Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),<br/>
1186 CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)<br/>
1190 fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),<br/>
1227 Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),<br/>
1229 xmllint was not parsing the --c14n11 flag (Sérgio Batista),<br/>
1242 Avoid a possibility of dangling encoding handler (Gaurav),<br/>
1253 xmllint --pretty crashed without following numeric argument (Tim Galeckas),<br/>
1263 Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),<br/>
1278 Add limitations about encoding conversion (Daniel Veillard),<br/>
1280 Fix incorrect spelling entites-&gt;entities (Jan Pokorný),<br/>
1291 os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),<br/>
1300 …OS400: UTF8&lt;--&gt;EBCDIC wrappers for system and external library calls (Patrick Monnerat),<br/>
1305 configure: Add --with-python-install-dir (Jonas Eriksson),<br/>
1322 build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),<br/>
1323 build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),<br/>
1325 add additional defines checks for support "./configure --with-minimum" (Denis Pauk),<br/>
1351 xmllint --memory should fail on empty files (Daniel Veillard),<br/>
1352 Cast encoding name to char pointer to match arg type (Nikolay Sivov)<br/>
1372 Add documentation for xmllint --xpath (Daniel Veillard),<br/>
1384 Fix rpmbuild --nocheck (Mark Salter),<br/>
1386 Fix Broken multi-arch support in xml2-config (Daniel Veillard),<br/>
1399 Activate detection of encoding in external subset (Daniel Veillard),<br/>
1407 Fix the flushing out of raw buffers on encoding conversions (Daniel,<br/>
1415 Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),<br/>
1441 Add a --pushsmall option to xmllint (Daniel Veillard)<br/>
1445 Switched comment in file to UTF-8 encoding (Daniel Veillard),<br/>
1469 xml2-config.1 markup error (Christian Weisgerber),<br/>
1475 Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),<br/>
1485 clean redefinition of {v}snprintf in C-source (Roumen Petrov),<br/>
1523 Keep non-significant blanks node in HTML parser (Daniel Veillard),<br/>
1571 Adding new encoding function to deal with the new structures (Daniel Veillard),<br/>
1575 Fix xmllint --xpath node initialization (Daniel Veillard)<br/>
1620 Fix library problems with mingw-w64 (Michael Cronenworth),
1649 Fix a compilation problem with --minimum (Brandon Slack),
1654 Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
1655 Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
1660 Fix a crash with xmllint --path on empty results (Daniel Veillard),
1675 Fix an off by one error in encoding (Daniel Veillard),
1694 Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
1700 Add --system support to autogen.sh (Daniel Veillard),
1708 Add exception for new W3C PI xml-model (Daniel Veillard),
1709 Add options to ignore the internal encoding (Daniel Veillard),
1714 configure: add -Wno-long-long to CFLAGS (Stefan Kost),
1722 Cleanups before 2.8.0-rc2 (Daniel Veillard),
1724 Remove vestigial de-ANSI-fication support. (Javier Jardón),
1728 Fix -Wempty-body warning from clang (Nico Weber),
1733 configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
1745 Fix web site encoding problems (Daniel Veillard),
1762 630140 fix iso995x encoding error (Daniel Veillard),
1770 Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
1784 Various cleanups on encoding handling (Daniel Veillard),
1787 Cleanup encoding pointer comparison (Nikolay Sivov),
1794 Adding a --xpath option to xmllint (Daniel Veillard),
1795 Make HTML parser non-recursive (Eugene Pimenov)
1812 Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
1816 htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
1818 Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
1831 xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
1848 Restore behavior of --with-threads without argument (Andrew W. Nosenko),
1872 Add -lnetwork for compiling on Haiku (Scott McCreary),
1897 594514 memory leaks - duplicate initialization (MOD),
1899 492317 Fix Relax-NG validation problems (Daniel Veillard),
1905 566012 autodetected encoding and encoding conflict (Daniel Veillard),
1907 587663 Incorrect Attribute-Value Normalization (Daniel Veillard),
1919 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard),
1921 559410 - Regexp bug on (...)? constructs (Daniel Veillard),
1923 592430 - HTML parser runs into endless loop (Daniel Veillard),
1930 588441 allow '.' in HTML Names even if invalid (Daniel Veillard),
1932 579317 Try to find the HTML encoding information (Daniel Veillard),
1937 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer),
1947 Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard),
1948 potential NULL dereference on non-glibc (Jim Meyering),
1967 Chasing dead assignments reported by clang-scan (Daniel Veillard),
1973 555833 always use rm -f in uninstall-local (Daniel Veillard),
2003 when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
2020 <li>Documentation: switch ChangeLog to UTF-8, improve mutithreads and
2026 <li>Bug fixes: various realloc problems (Ashwin), potential double-free
2027 (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
2036 <li>Improvement: switch parser to XML-1.0 5th edition, add parsing flags
2057 writer CDATA output after a text node (Alex Khesin), UTF-16 encoding
2066 (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding
2084 <li>Security fix: missing of checks in UTF-8 parsing</li>
2087 (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
2092 HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
2093 output from xml2-config (Fred Crozat), avoid an xmllint crash
2100 testURI --debug option, </li>
2109 (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
2125 htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
2127 (Georges-André Silber), XPath number serialization (William Brack),
2132 dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
2133 error handling, recustion on next in catalogs, fix a Relax-NG crash,
2135 invalid character in attribute detection bug, big comments before
2154 concurrent threads initialization (Ted Phelps), invalid char
2183 add --html --memory case to xmllint</li>
2184 <li>building fix: fix --with-minimum (Felipe Contreras), VMS fix,
2189 (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix
2190 --with-minimum --with-schemas builds</li>
2203 context, arg error in SAX callback (Mike Hommey), fix mixed-content
2204 autodetect when using --noblanks, fix xmlIOParseDTD error handling,
2205 fix bug in xmlSplitQName on special Names, fix Relax-NG element content
2209 meta encoding indications, bugs with encoding BOM and xmlSaveDoc,
2225 <li>bug fixes: encoding buffer problem, mix of code and data in
2243 HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1
2244 cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on
2253 one Relax-NG interleave bug, xmllint --path and --valid,
2261 code point, ixmllint --nonet to never reach the net (Gary Coady),
2271 --with-minimum compilation fixes (William Brack), error case handling fix
2274 MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick
2287 split problem (William), issues with non-namespaced attributes in
2304 transition bug in regexps, ctxt-&gt;standalone = -2 to indicate no
2325 <li>documentation: generation of gtk-doc like docs, integration with
2338 <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
2350 Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
2354 type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
2366 <li>documentation: xmllint man page had --nonet duplicated</li>
2389 Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
2402 ienhancement to xmllint --shell namespaces support, Windows port of the
2410 <li>build fixes: drop .la from RPMs, --with-minimum build fix (William
2421 encoding code, Relax-NG validation bug, potential crash if
2423 switched back to assuming UTF-8 in case no encoding is given at
2434 some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
2436 xmlreader stopping on non-fatal errors, thread support for dictionnaries
2460 maintainer-clean dependency(William), build in a different directory
2461 (William), fixing --with-minimum configure build (William), BeOS build
2462 (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
2468 UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
2490 <li>bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding
2491 conversion functions return values, UTF-8 bug affecting XPath reported by
2503 source tree (Thomas Fitzsimmons)</li>
2539 <li>build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc,
2544 problem (William), Schemas hexbinary empty values, encoding error could
2546 <li>Improvements: Schemas validity improvements (Kasimier), added --path
2547 and --load-trace options to xmllint</li>
2553 <li>build fixes: fix --with-minimum, elfgcchack.h fixes (Peter
2558 Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support
2572 (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey),
2573 xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude
2574 to not generate start/end nodes, extend xmllint --version to include CVS
2584 <li>build fixes: --with-minimum (William Brack), some gcc cleanup
2585 (William), --with-thread-alloc (William)</li>
2592 (William), xmlSchemas errors (William), invalid charref problem pointed
2593 by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
2601 <li>improvement: custom per-thread I/O enhancement (Rob Richards), register
2603 test for non-Unix users (William), dynamically increase the number of
2604 XPath extension functions in Python and fix a memory leak (Marc-Antoine
2614 <li>build fixes: --without-html problems, make check without make all</li>
2620 (Morten Welinder), add --maxmem option to xmllint, add
2636 Beckett), Relax-NG compilation (William Brack), Regexp patches (with
2637 William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
2638 William), Relax-NG name classes compares (William), XInclude duplicate
2639 fallback (William), external DTD encoding detection (William), a DTD
2644 Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
2660 <li>Relax-NG: fix when processing XInclude results (William), external
2669 groups '-' handling (William), dictionary reference counting problems,
2673 <li>compilation and portability fixes: --without-valid, catalog cleanups
2674 (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation
2675 to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino
2686 mode with unescaped '&gt;' characters, fix xmllint --stream --timing, fix
2687 xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent
2688 handling NULL, trying to fix Relax-NG/Perl interface.</li>
2690 <li>Added relaxng option to xmllint --shell</li>
2705 <li>Build: fix for automake-1.8 (Alexander Winston), warnings removal
2707 --with-minimum configuration.</li>
2769 <li>UTF-16 cleanup and BOM issues (William Brack)</li>
2806 <li>fixed xmllint --html to use the HTML serializer on output (added
2807 --xmlout to implement the previous behaviour of saving it using the XML
2829 <li>general bug fixes: mandatory encoding in text decl, serializing
2839 a --with-minimum configuration will weight around 160KBytes</li>
2863 <li>Parser&lt;-&gt;HTTP integration fix, proper processing of the Mime-Type
2865 <li>Relax-NG: bug fixes including the one reported by Martijn Faassen and
2887 <li>xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
2888 testing, --nodict for building without tree dictionary, --nocdata to
2889 replace CDATA by text, --nsclean to remove surperfluous namespace
2891 <li>added xml2-config --libtool-libs option from Kevin P. Fleming</li>
2897 <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li>
2906 <li>risk of crash in Relax-NG</li>
2915 <li>UTF-16 support fixes (Mark Itzcovitz)</li>
2929 (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli),
2930 xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean
2934 <li>better interfaces for Relax-NG error handling (Joachim Bauch, )</li>
2937 <li>configure flag for -with-fexceptions when embedding in C++</li>
2938 <li>couple of new UTF-8 helper functions (William Brack)</li>
2939 <li>general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)</li>
2941 <li>general compilation/warning cleanup Solaris/HP-UX/... (William
2947 <li>bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark
2948 Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack),
2950 Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs,
2962 <li>added --nonet option to xmllint</li>
2968 <li>Relax-NG: Compiling to regexp and streaming validation on top of the
2969 xmlReader interface, added to xmllint --stream</li>
2991 <li>bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and
2992 XInclude entities handling, encoding detection on external subsets, XML
2995 <li>documentation: added --relaxng option to xmllint man page (John)</li>
3006 <li>Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding
3032 serializing namespace nodes, encoding conversion bug, XHTML1
3039 <li>First implementation of RelaxNG, added --relaxng flag to xmllint</li>
3070 and iterators for Python-2.2 (Hannu Krosing)</li>
3110 <li>added encoding support for XInclude parse="text"</li>
3123 <li>added grep to xmllint --shell</li>
3162 <li>XPath fixes (William), xf:escape-uri() (Wesley Terpstra)</li>
3163 <li>Python binding fixes: makefiles (William), generator, rpm build, x86-64
3200 Schemas <a href="http://www.w3.org/TR/xmlschema-1/">structures</a> and <a
3201 href="http://www.w3.org/TR/xmlschema-2/">datatypes</a> code, beware, all
3226 <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
3237 <li>removed the --with-buffer option it was becoming unmaintainable</li>
3248 regression tests, XPath extension functions can now return node-sets</li>
3269 href="http://www.opensource.org/licenses/mit-license.html">MIT
3271 confusion around the previous dual-licensing</li>
3313 <li>improvements on xmllint: Morus Walter patches for --format and
3314 --encode, Stefan Kost and Heiko Rupp improvements on the --shell</li>
3373 <li>added --convert to xmlcatalog, bug fixes and cleanups of XML
3393 <li>added a --format option to xmllint</li>
3444 <li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
3449 <li>update of libxml-doc.el (Felix Natter)</li>
3458 handling), added encoding aware APIs, cleanup of this code</li>
3460 <li>implemented a specific PI for encoding support in the DocBook SGML
3462 <li>some XPath fixes (-Infinity, / as a function parameter and namespaces
3467 <li>added --version to xmllint for bug reports</li>
3486 <li>trying to get better linking on Solaris (-R)</li>
3560 should probably be rewritten to support ambiguous content model :-\</li>
3603 <li>Patch to allow simultaneous install of libxml-devel and
3604 libxml2-devel</li>
3632 <li>erroneous release :-(</li>
3711 <li>fixed an encoding support problem when parsing from a memory block</li>
3720 <li>better encoding support/cleanup and saving (content is now always
3721 encoded in UTF-8)</li>
3727 <li>Added a page about <a href="encoding.html">libxml Internationalization
3757 <li>output to a given encoding has been added/tested</li>
3770 $prefix/include/gnome-xml), they also are referenced by
3795 FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and
3802 <li>Some interfaces may changes (especially a bit about encoding).</li>
3805 <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
3807 <li>Better handling of entities, especially well-formedness checking
3818 encoding yet). This URL is rebuilt every couple of hours using the CVS
3826 libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
3831 avoiding heuristic is really the Right Way :-\</li>
3832 <li>The unchecked use of snprintf which was breaking libxml-1.8.6
3848 href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the
3868 <li>a shell-like interface to the document tree (try tester --shell :-)</li>
3908 configure with --with-buffers to enable them.</li>
3943 href="html/libxml-nanohttp.html">nanohttp</a> module.</li>
3948 href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li>
3951 <li>Added an HTML parser front-end</li>
3956 <p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
3957 markup-based structured documents. Here is <a name="example">an example XML
3973 information about its encoding. Then the rest of the document is a text
3983 SGML) to simple data encoding mechanisms like configuration file formatting
3996 <p>A separate library called libxslt is available implementing XSLT-1.0 for
4006 href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>
4007 (<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in
4012 most up-to-date C++ bindings for libxml2, check the <a
4015 …href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libxmlplusplus/libxml%2b%2b/examples/">exampl…
4016 <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper
4022 <li>XML::LibXML <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl
4024 <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXSLT">Perl libxslt
4036 href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
4039 href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
4043 href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
4050 an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and
4060 commands for Property-lists (Apple's fast lookup table XML format.)</li>
4075 href="http://lxml.de/mailinglist/">check the mailing-list</a>.</p>
4078 maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port
4082 <a href="libxml2-api.xml">an XML API description file</a> which allows to
4085 build the bindings is python/generator.py in the source distribution.</p>
4090 href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python
4092 href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python
4094 <li>Otherwise use the <a href="ftp://xmlsoft.org/libxml2/python/">libxml2-python
4158 ctxt = libxml2.createFileParserCtxt("invalid.xml")
4169 the error messages when trying to validate the invalid document.</p>
4195 the resource in case URI-References need to be computed by the parser.</p>
4363 <li>a SAX tree module to build an in-memory DOM representation</li>
4385 chained in double-linked lists of siblings and with a children&lt;-&gt;parent
4395 <p>In the source package there is a small program (not installed by default)
4398 code and in the XML parser itself. It has an option <strong>--debug</strong>
4399 which prints the actual in-memory structure of the document; here is the
4438 a <strong>callback-based interface</strong> to the parser. Before parsing,
4442 <p>To get more detailed step-by-step guidance on using the SAX interface of
4444 href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">nice
4449 program located in the gnome-xml module (it's usually not shipped in the
4450 binary packages of libxml, but you can find it in the tar source
4488 <p>Most of the other interfaces of libxml2 are based on the DOM tree-building
4534 <p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a
4538 <li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring
4540 <li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring
4566 <li>The system string is actually an URI-Reference (as defined in <a
4666 <code>--valid</code> option turns-on validation of the files given as input.
4670 <p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p>
4672 <p>the -- noout is used to disable output of the resulting tree.</p>
4674 <p>The <code>--dtdvalid dtd</code> allows validation of the document(s)
4678 href="http://xmlsoft.org/html/libxml-valid.html">associated
4683 <p>DTDs are as old as SGML. So there may be a number of examples on-line, I
4686 <li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li>
4710 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code>
4726 <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet
4729 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a>
4740 allocation before the parser is fully functional (some encoding structures
4745 <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlCleanupParser
4750 <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser
4763 <p>When configured using --with-mem-debug flag (off by default), libxml2 uses
4770 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a>
4772 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a>
4774 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a>
4776 <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump
4823 The I/O and encoding handlers will probably account for a few KBytes.
4829 size of the UTF8 serialization of this document (example the XML-1.0
4868 without knowing what encoding it uses</b>, then as Joel Spolsky said <a
4876 <li><a href="encoding.html#What">What does internationalization support
4878 <li><a href="encoding.html#internal">The internal encoding, how and
4880 <li><a href="encoding.html#implemente">How is it implemented ?</a></li>
4881 <li><a href="encoding.html#Default">Default supported encodings</a></li>
4882 <li><a href="encoding.html#extend">How to extend the existing
4889 by using Unicode. Any conformant XML parser has to support the UTF-8 and
4890 UTF-16 default encodings which can both express the full unicode ranges. UTF8
4891 is a variable length encoding whose greatest points are to reuse the same
4892 encoding for ASCII and to save space for Western encodings, but it is a bit
4893 more complex to handle in practice. UTF-16 use 2 bytes per character (and
4895 bit overkill for Western languages encoding. Moreover the XML specification
4898 XML document encoded in ISO-8859-1 and using accentuated letters that we
4900 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
4906 <li>information about it's encoding is saved</li>
4908 <li>it can be saved in its original encoding</li>
4909 <li>it can also be saved in another encoding supported by libxml2 (for
4914 exception of a few routines to read with a specific encoding or save to a
4915 specific encoding, is completely agnostic about the original encoding of the
4921 <pre>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
4922 "http://www.w3.org/TR/REC-html40/loose.dtd"&gt;
4925 &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"&gt;
4931 <h3><a name="internal">The internal encoding, how and why</a></h3>
4934 default internal encoding, and that encoding to be UTF-8, here are the
4937 <li>keeping the native encoding in the internal form would force the libxml
4938 users (or the code associated) to be fully aware of the encoding of the
4940 the content would have to be provided in the document encoding, i.e. the
4942 to the encoding, etc ... Very hard in practice, though in some specific
4944 <li>the second decision was which encoding. From the XML spec only UTF8 and
4946 is mandatory support. UCS-4 (32 bits fixed size encoding) could be
4948 support. I selected UTF-8 on the basis of efficiency and compatibility
4951 <li>UTF-8 while a bit more complex to convert from/to (i.e. slightly
4953 than UTF-16 (and UCS-4) for a majority of the documents I see it used
4960 for the conversion to UTF-8</li>
4962 most of the time, doing the conversion with an internal encoding
4963 requiring all their code to be rewritten was a serious show-stopper
4964 for using UTF-16 or UCS-4.</li>
4965 <li>UTF-8 is being used as the de-facto internal encoding standard for
4969 - they are using UTF-16)</li>
4977 as UTF-8 valid strings. The proper way to terminate an xmlChar * string
4980 the values has been properly converted to UTF-8</li>
4990 <li>when a document is processed, we usually don't know the encoding, a
4991 simple heuristic allows to detect UTF-16 and UCS-4 from encodings where
4992 the ASCII range (0-0x7F) maps with ASCII</li>
4993 <li>the xml declaration if available is parsed, including the encoding
4994 declaration. At that point, if the autodetected encoding is different
4996 <li>If there is no encoding declaration, then the input has to be in either
4997 UTF-8 or UTF-16, if it is not then at some point when processing the
4998 input, the converter/checker of UTF-8 form will raise an encoding error.
4999 You may end-up with a garbled document, or no document at all ! Example:
5000 <pre>~/XML -&gt; ./xmllint err.xml
5001 err.xml:1: error: Input is not proper UTF-8, indicate encoding !
5008 <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and
5009 then search the default registered encoding converters for that encoding.
5013 <pre>~/XML -&gt; ./xmllint err2.xml
5014 err2.xml:1: error: Unsupported encoding UnsupportedEnc
5015 &lt;?xml version="1.0" encoding="UnsupportedEnc"?&gt;
5019 plugged as a front-end to the I/O module) for that entity. It captures
5020 and converts on-the-fly the document to be parsed to UTF-8. The parser
5021 itself just does UTF-8 checking of this input and process it
5022 transparently. The only difference is that the encoding information has
5025 <li>The result (when using DOM) is an internal form completely in UTF-8
5026 with just an encoding information on the document node.</li>
5031 called, xmlSaveFile() will just try to save in the original encoding, while
5033 encoding:</p>
5035 <li>if no encoding is given, libxml2 will look for an encoding value
5037 encoding,
5038 <p>otherwise everything is written in the internal form, i.e. UTF-8</p>
5040 <li>so if an encoding was specified, either at the API level or on the
5041 document, libxml2 will again canonicalize the encoding name, lookup for a
5045 buffer, then libxml2 will simply push the UTF-8 serialization to through
5049 trying to push an UTF-8 encoded Chinese character through the UTF-8 to
5050 ISO-8859-1 converter won't work. Since the encoders are progressive they
5053 buffer and replace it with the associated charRef encoding &amp;#123; and
5056 a problem in the current version, in practice avoid using non-ascii
5057 characters for tag or attribute names). A special "ascii" encoding name
5063 terminal using ISO-8859-1 as the text encoding:</p>
5064 <pre>~/XML -&gt; ./xmllint isolat1
5065 &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
5067 ~/XML -&gt; ./xmllint --encode UTF-8 isolat1
5068 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
5070 ~/XML -&gt; </pre>
5073 processing. Looking up and modifying the content encoding is a bit more
5076 been provided. The parser also attempts to switch encoding on the fly when
5083 (located in encoding.c):</p>
5085 <li>UTF-8 is supported by default (null handlers)</li>
5086 <li>UTF-16, both little and big endian</li>
5087 <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li>
5089 <li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML
5095 linux machine with glibc-2.1 the list of supported encodings and aliases fill
5096 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the
5099 <p>To convert from the UTF-8 values returned from the API to another encoding
5101 href="html/libxml-encoding.html">the encoding module</a> like <a
5102 href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the
5107 <h4>Encoding aliases</h4>
5109 <p>From 2.2.3, libxml2 has support to register encoding names aliases. The
5110 goal is to be able to parse document whose encoding is supported but where
5124 <p>Well adding support for new encoding, or overriding one of the encoders
5126 conversion routines to/from UTF-8, and register them using
5128 called automatically if the parser(s) encounter such an encoding name
5130 their arguments and expected return values are described in the encoding.h
5148 href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides
5160 provides buffering and is also a placeholder where the encoding
5161 converters to UTF8 are piggy-backed.</li>
5184 <li>if an encoding change is detected it will be installed on the input
5199 href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a> </code>which is a
5201 either best-fit or use an exponential doubling one (CPU vs. memory use
5202 trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and
5214 encoding handler are also present to support charset conversion when
5284 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;context = file;
5285 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;writecallback = xmlFileWrite;
5286 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;closecallback = NULL; /* No close callback…
5336 <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p>
5339 <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
5343 <p>"http://www.oasis-open.org/committes/tr.xsl"</p>
5345 <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p>
5363 <li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML
5378 &lt;!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
5382 automatically consulted to lookup the public identifier "-//Norman Walsh//DTD
5388 <p style="font-size: 10pt"><strong>Note</strong>: Really don't use this
5403 "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
5404 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
5406 &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
5407 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
5416 &lt;rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
5427 &lt;delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
5429 &lt;delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
5431 &lt;delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
5433 &lt;delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
5435 &lt;delegateURI uriStartString="http://www.oasis-open.org/docbook/"
5462 <pre>orchis:~/XML -&gt; xmllint --memory --noout test/ent2
5464 orchis:~/XML -&gt; export XML_DEBUG_CATALOG=
5465 orchis:~/XML -&gt; xmllint --memory --noout test/ent2
5470 orchis:~/XML -&gt; </pre>
5482 <pre>orchis:~/XML -&gt; ./xmlcatalog test/catalogs/docbook.xml \
5483 "-//OASIS//DTD DocBook XML V4.1.2//EN"
5484 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
5485 orchis:~/XML -&gt; </pre>
5487 <p>For debugging what is going on, adding one -v flags increase the verbosity
5490 <pre>orchis:~/XML -&gt; ./xmlcatalog -v test/catalogs/docbook.xml \
5491 "-//OASIS//DTD DocBook XML V4.1.2//EN"
5493 Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
5494 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
5496 orchis:~/XML -&gt; </pre>
5500 <pre>orchis:~/XML -&gt; ./xmlcatalog -shell test/catalogs/docbook.xml \
5501 "-//OASIS//DTD DocBook XML V4.1.2//EN"
5513 &gt; public "-//OASIS//DTD DocBook XML V4.1.2//EN"
5514 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
5516 orchis:~/XML -&gt; </pre>
5525 to create a catalog the -create option provide this facility:</p>
5526 <pre>orchis:~/XML -&gt; ./xmlcatalog --create tst.xml
5528 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
5529 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
5531 orchis:~/XML -&gt; </pre>
5534 result on the standard output, this can be overridden using the -noout
5535 option. The <code>-add</code> command allows to add entries in the
5537 <pre>orchis:~/XML -&gt; ./xmlcatalog --noout --create --add "public" \
5538 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
5539 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
5540 orchis:~/XML -&gt; cat tst.xml
5542 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
5543 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
5545 &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
5546 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
5548 orchis:~/XML -&gt; </pre>
5550 <p>The <code>-add</code> option will always take 3 parameters even if some of
5554 <p>Similarly the <code>-del</code> option remove matching entries from the
5556 <pre>orchis:~/XML -&gt; ./xmlcatalog --del \
5557 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
5559 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
5560 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
5562 orchis:~/XML -&gt; </pre>
5564 <p>The catalog is now empty. Note that the matching of <code>-del</code> is
5575 automatically generated <a href="html/libxml-catalog.html">API page for
5584 by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to
5590 <li>a per-document catalog, this one is built if the document uses the
5591 <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
5633 <p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is
5634 the per-document equivalent.</p>
5673 href="http://www.oasis-open.org/committees/entity/">Committee on Entity
5679 directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
5705 <p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are
5706 separated from the <a href="html/libxml-htmlparser.html">HTML parser
5712 documents either from in-memory strings or from files. The functions are
5716 <dd><p>Parse a null-terminated string containing the document.</p>
5762 doc = ctxt-&gt;myDoc;
5772 <p>The tree-building interface makes the parser memory-hungry, first loading
5775 <a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James
5791 doc-&gt;children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
5792 xmlSetProp(doc-&gt;children, "prop1", "gnome is great");
5793 xmlSetProp(doc-&gt;children, "prop2", "&amp; linux too");
5794 tree = xmlNewChild(doc-&gt;children, NULL, "head", NULL);
5796 tree = xmlNewChild(doc-&gt;children, NULL, "chapter", NULL);
5806 <p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your
5812 <pre><code>doc-&gt;children-&gt;children-&gt;children</code></pre>
5815 <pre>doc-&gt;children-&gt;children-&gt;next-&gt;children-&gt;children</pre>
5821 present before the document root, so <code>doc-&gt;children</code> may point
5828 is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
5851 non-predefined entity references like &amp;Gnome; will be stored
5864 XML encoding in the string, it will substitute it with its value (say,
5892 <p>The library transparently handles compression when doing file-based
5897 <dd><p>Gets the document compression ratio (0-9).</p>
5948 href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault()</a>
5954 <pre>/gnome/src/gnome-xml -&gt; ./xmllint --debug test/ent1
5967 <pre>/gnome/src/gnome-xml -&gt; ./tester --debug --noent test/ent1
5975 suggest that you keep the non-substituting default behaviour and avoid using
5980 entities where necessary to prevent well-formedness problems, and will also
5985 <p><span style="background-color: #FF0000">WARNING</span>: handling entities
5987 non-predefined entities in your documents, then the learning curve to handle
5995 href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by
5998 associated with an in-memory structure and all elements or attributes within
6007 value in the long-term. Example:</p>
6021 version-independent prefix is installed on the root element of your document,
6033 if(!strncmp(node-&gt;name,"mytag",5)
6034 &amp;&amp; node-&gt;ns
6035 &amp;&amp; !strcmp(node-&gt;ns-&gt;href,"http://www.mysite.com/myns/1.0")) {
6046 such documents one needs to use schema-validation, which is supported in
6047 libxml2 as well. See <a href="http://www.relaxng.org/">relagx-ng</a> and <a
6048 href="http://www.w3c.org/XML/Schema">w3c-schema</a>.</p>
6071 <h3>How to fix libxml-1.x code:</h3>
6080 is now -lxml2 . There is a new xml2-config script which should be used to
6093 s/-&gt;root/-&gt;children/g will probably do it.</li>
6119 <pre>xml2-config --cflags</pre>
6127 <h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3>
6145 <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li>
6154 <li>Change your configure script to look first for xml2-config and fall
6155 back using xml-config . Use the --cflags and --libs output of the command
6157 <li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and
6158 libxml-devel-1.8.y can be kept simultaneously)</li>
6160 recompile, if steps 2 and 3 were done right it should compile as-is</li>
6182 <li>configure the library accordingly using the --with-threads options</li>
6198 <li>global variables per-thread override</li>
6202 <p>XPath has been tested for threaded usage on non-modified document
6204 are accessed read-only !</p>
6210 documents. Native support for DOM in Gnome is on the way (module gnome-dom),
6211 and will be based on gnome-xml. This will be a far cleaner interface to
6229 &lt;gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"&gt;
6239 &lt;gjob:Modified&gt;Mon, 07 Jun 1999 20:27:45 -0400 MET DST&lt;/gjob:Modified&gt;
6325 cur = cur-&gt;xmlChildrenNode;
6327 if ((!strcmp(cur-&gt;name, "Person")) &amp;&amp; (cur-&gt;ns == ns))
6328 ret-&gt;name = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
6329 if ((!strcmp(cur-&gt;name, "Email")) &amp;&amp; (cur-&gt;ns == ns))
6330 ret-&gt;email = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
6331 cur = cur-&gt;next;
6348 done by a simple equality test (cur-&gt;ns == ns).</li>
6387 cur = cur-&gt;xmlChildrenNode;
6390 if ((!strcmp(cur-&gt;name, "Project")) &amp;&amp; (cur-&gt;ns == ns)) {
6391 ret-&gt;projectID = xmlGetProp(cur, "ID");
6392 if (ret-&gt;projectID == NULL) {
6396 if ((!strcmp(cur-&gt;name, "Application")) &amp;&amp; (cur-&gt;ns == ns))
6397 ret-&gt;application = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
6398 if ((!strcmp(cur-&gt;name, "Category")) &amp;&amp; (cur-&gt;ns == ns))
6399 ret-&gt;category = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
6400 if ((!strcmp(cur-&gt;name, "Contact")) &amp;&amp; (cur-&gt;ns == ns))
6401 ret-&gt;contact = parsePerson(doc, ns, cur);
6402 cur = cur-&gt;next;
6412 storage. This is left as an exercise to the reader :-)</p>
6431 href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
6438 href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
6443 href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
6449 href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue