Re: Problem with gift-add-collection.pl

David Squire <[email protected]> Fri, 14 Dec 2007 09:52:27 +1100
Newsgroups gmane.comp.gnu.gift.general
Message-ID <[email protected]>
varma.s wrote:
>  Hello,
>  
> I have a question concerning the gift-add-collection.pl script.

Which version of GIFT are you using? We need to know this so that we can 
work out what is on line 796 of your gift-add-collection.pl.

> It seems like everything works fine with extracting and converting the  
> images but at the end of the process I get the following output / error  
> message:  

[snip]

> Copying /root/gift-config.mrml  to /root/gift-config.mrml-old  
> XML::DOM::Attr=ARRAY(0x89e8580)  
> Can't locate object method "getAttribute" via package "XML::DOM::Attr" 
> at /usr/local/bin/gift-add-collection.pl line 796, <LOCALELIST> line 264.  
> ----> collection-id c-46-1-10-11-11-107-2-344-0  

Well, that's an error in using a Perl package. Looking at 
http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM/Attr.pod, it 
seems that XML::DOM::Attr indeed does not have a method getAttribute. 
Nor does it inherit one from XML::DOM::Node (according to 
http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM/Node.pod). It 
*is* a method of XML::DOM::Element though (see 
http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM/Element.pod).

My guess would be that somehow an object of the wrong type is being 
generated - an XML::DOM::Attr object rather than a XML::DOM::Element 
object. We need to know your version information though so we can look 
at the right version of gift-add-collection.pl.

Regards,

David


-- 
Dr David McG. Squire,  Senior Lecturer
Clayton School of Information Technology, Monash University, Australia
CRICOS Provider No. 00008C       http://www.csse.monash.edu.au/~davids/