Re: [xml] xinclude and xmlParseChunk



On Tue, Mar 01, 2011 at 10:14:30PM +0000, Lucian Smith wrote:
Hello, all.  I am investigating how to modify a system that currently uses 
libxml, with its core parsing done by calling the function 
'xmlParseChunk'.

I would like to expand the capabilities of the system to allow it to 
expand xinclude directives.  However, all the ways I have discovered to do 
this seem to be incompatible with only using xmlParseChunk--the 
'xmlCtxtUseOptions' function does not even check the XML_PARSE_XINCLUDE 
flag.

Is there any way to access xinclude auto-expansion within 'xmlParseChunk'?  
Or am I going to have to pre-process or post-process the data?

xmlParseChunk is somehow a hack, as it not full proper XML parsing.

XInclude itself is not integrated in the parse phase, it's always a
post processing option, for example "xmllint --xinclude" just calls
xmlXIncludeProcessFlags() on the resulting document.

You will have to use xmlXIncludeProcessTreeFlags() on all the top
element node that xmlParseChunk may return to you.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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