From 1177ca42ab07e6a835b0a9a9218822b62caca3e4 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 26 Apr 2003 22:29:54 +0000 Subject: updated the web site separated developers from common pages, made the * NEWS doc/*.xsl doc/*.html: updated the web site separated developers from common pages, made the transition to XHTML1, added validity checking to the makefile rules. Daniel --- doc/FAQ.html | 231 +++++++++++------------------------------------------------ 1 file changed, 42 insertions(+), 189 deletions(-) (limited to 'doc/FAQ.html') diff --git a/doc/FAQ.html b/doc/FAQ.html index 89c295ff..a5fae438 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -1,142 +1,38 @@ - - - - - - -FAQ - - - - - -
-Gnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo
-
-

The XML C library for Gnome

-

FAQ

-
-
- -
- - - -
Main Menu
-
- -
- -
- - - -
Related links
- - - -
API Indexes
-
-

Table of Contents:

-
    -
  • License(s)
  • +FAQ
    Gnome2 LogoW3C LogoRed Hat Logo
    Made with Libxml2 Logo

    The XML C library for Gnome

    FAQ

    -
    Main Menu
    Related links

    Table of Contents:

    -

    -License(s)

    -
      -
    1. -Licensing Terms for libxml +

      License(s)

      1. Licensing Terms for libxml

        libxml is released under the MIT License; see the file Copyright in the distribution for the precise wording

      2. -
      3. -Can I embed libxml in a proprietary application ? +
      4. Can I embed libxml in a proprietary application ?

        Yes. The MIT License allows you to keep proprietary the changes you made to libxml, but it would be graceful to send-back bug fixes and improvements as patches for possible incorporation in the main development tree.

      5. -
      -

      Installation

      -
        -
      1. Unless you are forced to because your application links with a Gnome +

      Installation

      1. Unless you are forced to because your application links with a Gnome library requiring it, Do Not Use libxml1, use libxml2
      2. -
      3. -Where can I get libxml ? -

        The original distribution comes from rpmfind.net or gnome.org -

        +
      4. Where can I get libxml ? +

        The original distribution comes from rpmfind.net or gnome.org

        Most Linux and BSD distributions include libxml, this is probably the safer way for end-users to use libxml.

        -

        David Doolin provides precompiled Windows versions at http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ -

        +

        David Doolin provides precompiled Windows versions at http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/

      5. -
      6. -I see libxml and libxml2 releases, which one should I install ? -
          -
        • If you are not constrained by backward compatibility issues with +
        • I see libxml and libxml2 releases, which one should I install ? +
          • If you are not constrained by backward compatibility issues with existing applications, install libxml2 only
          • If you are not doing development, you can safely install both. Usually the packages libxml and libxml2 are @@ -148,32 +44,24 @@ A:link, A:visited, A:active { text-decoration: underline } too for libxml2 >= 2.3.0
          • If you are developing a new application, please develop against libxml2(-devel)
          • -
          -
        • -
        • -I can't install the libxml package, it conflicts with libxml0 +
      7. +
      8. I can't install the libxml package, it conflicts with libxml0

        You probably have an old libxml0 package used to provide the shared library for libxml.so.0, you can probably safely remove it. The libxml packages provided on rpmfind.net provide libxml.so.0

      9. -
      10. -I can't install the libxml(2) RPM package due to failed +
      11. I can't install the libxml(2) RPM package due to failed dependencies

        The most generic solution is to re-fetch the latest src.rpm , and rebuild it locally with

        -

        -rpm --rebuild libxml(2)-xxx.src.rpm.

        +

        rpm --rebuild libxml(2)-xxx.src.rpm.

        If everything goes well it will generate two binary rpm packages (one providing the shared libs and xmllint, and the other one, the -devel package, providing includes, static libraries and scripts needed to build applications with libxml(2)) that you can install locally.

      12. -
      -

      Compilation

      -
        -
      1. -What is the process to compile libxml ? +

      Compilation

      1. What is the process to compile libxml ?

        As most UNIX libraries libxml follows the "standard":

        gunzip -c xxx.tar.gz | tar xvf -

        cd libxml-xxxx

        @@ -185,26 +73,21 @@ A:link, A:visited, A:active { text-decoration: underline }

        At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.

      2. -
      3. -What other libraries are needed to compile/install libxml ? +
      4. What other libraries are needed to compile/install libxml ?

        Libxml does not require any other library, the normal C ANSI API should be sufficient (please report any violation to this rule you may find).

        However if found at configuration time libxml will detect and use the following libs:

        -
          -
        • -libz : a +
          • libz : a highly portable and available widely compression library.
          • iconv: a powerful character encoding conversion library. It is included by default in recent glibc libraries, so it doesn't need to be installed specifically on Linux. It now seems a part of the official UNIX specification. Here is one implementation of the library which source can be found here.
          • -
          -
        • -
        • -Make check fails on some platforms +
      5. +
      6. Make check fails on some platforms

        Sometimes the regression tests' results don't completely match the value produced by the parser, and the makefile uses diff to print the delta. On some platforms the diff return breaks the compilation process; @@ -212,41 +95,31 @@ A:link, A:visited, A:active { text-decoration: underline }

        Sometimes (especially on Solaris) make checks fail due to limitations in make. Try using GNU-make instead.

      7. -
      8. -I use the CVS version and there is no configure script +
      9. I use the CVS version and there is no configure script

        The configure script (and other Makefiles) are generated. Use the autogen.sh script to regenerate the configure script and Makefiles, like:

        ./autogen.sh --prefix=/usr --disable-shared

      10. -
      11. -I have troubles when running make tests with gcc-3.0 +
      12. I have troubles when running make tests with gcc-3.0

        It seems the initial release of gcc-3.0 has a problem with the optimizer which miscompiles the URI module. Please use another compiler.

      13. -
      -

      -Developer corner

      -
        -
      1. -xmlDocDump() generates output on one line. +

      Developer corner

      1. xmlDocDump() generates output on one line.

        Libxml will not invent spaces in the content of a document since all spaces in the content of a document are significant. If you build a tree from the API and want indentation:

        -
          -
        1. the correct way is to generate those yourself too.
        2. +
          1. the correct way is to generate those yourself too.
          2. the dangerous way is to ask libxml to add those blanks to your content modifying the content of your document in the process. The result may not be what you expect. There is NO way to guarantee that such a modification won't affect other parts of the content of your document. See xmlKeepBlanksDefault () and xmlSaveFormatFile - () -
          3. -
          - + () +
      2. Extra nodes in the document:

        For a XML file as below:

        <?xml version="1.0"?>
        @@ -274,42 +147,35 @@ pnode=pxmlDoc->children->children;
        use should be limited to cases where you are certain there is no mixed-content in the document.

      3. -
      4. -I get compilation errors of existing code like when accessing +
      5. I get compilation errors of existing code like when accessing root or child fields of nodes.

        You are compiling code developed for libxml version 1 and using a libxml2 development environment. Either switch back to libxml v1 devel or even better fix the code to compile with libxml2 (or both) by following the instructions.

      6. -
      7. -I get compilation errors about non existing +
      8. I get compilation errors about non existing xmlRootNode or xmlChildrenNode fields.

        The source code you are using has been upgraded to be able to compile with both libxml and libxml2, but you need to install a more recent version: libxml(-devel) >= 1.8.8 or libxml2(-devel) >= 2.1.0

      9. -
      10. -XPath implementation looks seriously broken +
      11. XPath implementation looks seriously broken

        XPath implementation prior to 2.3.0 was really incomplete. Upgrade to a recent version, there are no known bugs in the current version.

      12. -
      13. -The example provided in the web page does not compile. +
      14. The example provided in the web page does not compile.

        It's hard to maintain the documentation in sync with the code <grin/> ...

        Check the previous points 1/ and 2/ raised before, and please send patches.

      15. -
      16. -Where can I get more examples and information than privoded on the +
      17. Where can I get more examples and information than privoded on the web page?

        Ideally a libxml book would be nice. I have no such plan ... But you can:

        -
          -
        • check more deeply the existing - generated doc -
        • +
          • check more deeply the existing + generated doc
          • look for examples of use for libxml function using the Gnome code. For example the following will query the full Gnome CVS base for the use of the xmlAddChild() function: @@ -317,32 +183,25 @@ pnode=pxmlDoc->children->children;

            This may be slow, a large hardware donation to the gnome project could cure this :-)

          • -
          • -Browse +
          • Browse the libxml source , I try to write code as clean and documented as possible, so looking at it may be helpful. In particular the code of xmllint.c and of the various testXXX.c test programs should provide good examples of how to do things with the library.
          • -
          - +
      18. What about C++ ?

        libxml is written in pure C in order to allow easy reuse on a number of platforms, including embedded systems. I don't intend to convert to C++.

        There are however a few C++ wrappers which may fulfill your needs:

        -
      19. How to validate a document a posteriori ?

        It is possible to validate documents which had not been validated at initial parsing time or documents which have been built from scratch @@ -366,10 +225,4 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ for instance.

      20. etc ...
      21. -
      -

      -

      Daniel Veillard

      -
    - - +

    Daniel Veillard

-- cgit v1.2.3