Re: [gdome]gdome_doc_importNode



On Wed, 25 Apr 2001, Daniel Veillard wrote:

> On Wed, Apr 25, 2001 at 02:12:23PM +0200, Paolo Casarini wrote:
> > So I've made a patch (see the attached file tree.c.patch) to apply to the
> > libxml2-2.3.7 tree.c file. This patch IS NOT an official libxml2 patch: I
> > only give you this to make gdome_doc_importNode work with entities
> > reference nodes.
> 
>   I'm working on this right now ...
> The right solution is of course quite more complex, multiple entity
> references to the same entity have a content pointing to the ENTITY_DECL
> node in the DTD. When copying an ENTITY_REF to the same document, then
> the children must point to the same node (in the DtD). If the copy is
> cross document, I will make an entity lookup in the target document
> but you will probably have to handle this differently depending on the
> case (and users preferences).
A DOM user should be able to add an entity reference node to a document
without its entity declaration.
The Open problem is that DOM2 specs don't allow to add entity declarations
to thet DocumentType interface of a Document. So or the DOM implementation
have to do this for the user or the DOM implementation have to document
that when a user add an entity reference node that doesn't have an already
declared entity declaration the resulted DOM tree will not can be a
parsable XML file.

Paolo
--
Paolo Casarini - casarini cs unibo it





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