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

[EP-tech] Re: Custom View Item Renderer



Hi,

It sounds like your custom view code is returning the wrong thing. When 
you create XML you need to return an element or documentfragment (*not* 
Document). These are from:

$repo->xml->create_element( "tagname", attr => "bang" );
$repo->xml->create_document_fragment;

Posting your code may be informative!

--
All the best,
Tim.

On 01/08/12 02:55, Edwards, Robin wrote:
>
> Hi all,
>
> I have a relatively new installation of version of 3.3.6 and have 
> implemented a custom menu renderer. Now I am attempting to use the 
> example item renderer (render_view_item_3col_boxes) and running into 
> "Can't import Documents! at 
> /opt/eprints3/bin/../perl_lib/EPrints/XML.pm line 316" on first use 
> (without any customisations).
>
> It seems to run into the error when trying to use the clone function 
> (line 316 perl_lib/EPrints/XML.pm) on the $block variable (line 672 
> perl_lib/EPrints/Update/Views.pm).
>
> I attempted just returning simple strings (in a custom function) but 
> still no dice.  I can't seem to locate what Is actually going wrong or 
> where else I should be looking.  Any advice would be appreciated.
>
> Regards
>
> Rob
>
> -- 
>
> Robin Edwards, Computer Systems Officer, Information Technology & 
> Resources
>
> James Cook University, Townsville QLD 4811 AUSTRALIA
>
> P +61 7 4781 5846
>
> E robin.edwards at jcu.edu.au <mailto:robin.edwards at jcu.edu.au>
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120801/a91ea0af/attachment.html