[gdome]Xinclude support
- From: Luca Padovani <lpadovan cs unibo it>
- To: Gdome mailing list <gdome gnome org>
- Subject: [gdome]Xinclude support
- Date: 22 Feb 2003 11:07:12 +0100
Gdome2 users,
xinclude support in libxml2 has been added some time ago, and although I
haven't had the change of trying it, I think it is in a pretty usable
shape, and Daniel is typically very reactive in case of bugs.
I was thinking of adding Xinclude support in Gdome2, and the best way of
doing this. As far as I understand libxml2 API, it is just a matter of
invoking the xmlXIncludeProcess on an XML document in order to
substitute the xinclude elements with the corresponding referenced
documents.
I currently see 3 ways:
1) implementing this outside Gdome2 by retrieving the hidden libxml2
document node and invoking libxml2 xinclude function directly.
2) Adding a Gdome2 extension method for Documents that invokes libxml2
xinclude function
3) Adding a flag to Gdome2 load/parsing methods (pretty much like
GDOME_LOAD_SUBSTITUTE_ENTITIES) in DOMImplementation, and invoking
libxml2 xinclude function if the flag is set.
There are pros and cons in each case. Here are the cons:
1) doesn't fit inside gdome2, so one has to either implement this
manually and possibly many times (for each program in which he/she uses
the feature). For XSLT transformations we've done this but the API
somehow justified the creation of a separate library (gdome2-xslt)
2) yet another extension to DOM... (and there is no current plan to add
Xinclude support in DOM level 3)
3) it is an extension, but much less invasive than 2). However, the flag
can only be used when loading the document from a URI or from Memory, so
it doesn't work for DOM documents created by the application one node at
a time.
Comments?
-- luca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]