Re: [xml] XInclude and xml:base attribute

On Wed, Jul 23, 2003 at 07:21:06PM +0200, Manuel González Castro wrote:

I'm using libxml2-2.5.8.win32 to do XInclude processing on my documents.

I've noticed that "xmllint --xinclude" doesn't add the xml:base attribute to the included elements (and I 
like that) but my C code adds it (and I'd like to avoid it):

#include <libxml/parser.h>
#include <libxml/xinclude.h>
int main(void)
    xmlDocPtr doc = xmlParseFile("in.xml");
    xmlSaveFormatFile("out.xml", doc, 1);
    return 0;

I've searched in xmllint.c and the documentation any function or switch to disable the xml:base attribute 
addition, no success. I can't find why xmllint and my code have different behaviuor.

Any idea?

  Hum, strange. The xml:base attribute is not added if libxml2 expect
not adding it to have the exact same effect, and basically doesn't do
it if the XIncluded resource is in the same "directory" as the document
doing the include.
  I can't see why your code would change that behaviour compared to xmllint
code ...


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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