Re: [gdome]DTD loading



On Thu, 29 Aug 2002, Christopher Gutteridge wrote:

> Hi. I'm working on a project called GNU EPrints. This is a large PERL
> project which uses lots of XML configuration files.
>
> I've been using a PERL implementation of DOM (XML::DOM) which has worked
> fine but I've run into some speed and scalability issues and wanted to
> shift to XML::GDOME which is the PERL wrappers for the gdome library.
> Ideally I want to support both, because XML::DOM is easier to install
> for demo systems.

You may also want to look at XML::LibXML - it is a little easier to
install because it requires one less C library.

I'm the author of XML::GDOME and the maintainer for XML::DOM.
If there are any methods you would to be added to easier method
to make it easier to switch back and forth let me know.

> I've run into a number of problems, and am hoping someone can help...
>
> * I have a number of files which have a DTD defined at the top. The DTD
>    contains values for entities used in the XML file but does not appear
>    to be read unless I set "LOAD...VALID" in which case it spews errors
>    as I do not have a complete DTD defined. If I move the ENTITY definitions
>    into the top of the XML file then it works as expected, but I do not want
>    to do this as the same set of entities is used by a number of files and
>    can be changed when configuration options in the software change.
>
>    A workaround might be to do something hacky using load with entity table,
>    but there is no perl wrapper for that.

Could you send me a sample DTD file?  I could look into adding support in
the perl wrapper for loading with an entity table.

> * Memory is important to me. If anyone understands how XML::GDOME cleans up
>    unreferenced documents I'd like to know. If it doesn't then it's not going
>    to be any use to me :(

It cleans memory up automatically.  Perl DESTROY calls are mapped to
gdome_foo_undef (where foo is the node type).  I have personally ran
through every test in XML::GDOME and verified that it doesn't leak
any memory.

> * I've had some problems deep cloning document fragments and calling getOwner
>    on the same. I'm not sure if this is a the library or the PERL wrapper
>    interface.

Could you send me a small test script which reproduces this problem?

-TJ




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