EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07903
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, Yuri <yurj@alfa.it>
- Subject: Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: Christöpher Gutteridge <totl@soton.ac.uk>
- Date: Wed, 26 Jun 2019 13:37:59 +0000
There is but we're back to deep memory for me so I gotta check the source code! All DOM elements belong to a document and if you parse a string, that's a new document. To get around this there's $node = $repository->xml->clone( $source_node ) and $fragment = $repository->xml->contents_of( $source_node ) these make copies of the whole node, or the contents of the node and these copies are owned by the DOM EPrints uses (if I recall it uses one big DOM document internally, and only converts to new documents on output.
On 26/06/2019 14:22, Yuri via Eprints-tech wrote:
Any idea? I'm starting the tediuos process of "->make_element ->appendChild"... Il 26/06/19 11:42, Yuri via Eprints-tech ha scritto:Hi! eprint_render here. I'm really bored of doing ->make_element ->appendChild to create an html, so long and takes ages for a programmer (impossible for a user/integrator). Is there another way? I've tried with my $citehtml = "<html here>"; my $citexml = EPrints::XML::parse_string( undef, $citehtml ); $citfrag->appendChild($citexml); but it returns appendChild: HIERARCHY_REQUEST_ERR is there a way, for example to render something (xpage like) and insert it in the dom? *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url="">*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=""> -- Christopher Gutteridge <totl@soton.ac.uk> You should read our team blog at http://blog.soton.ac.uk/webteam/ |
- Follow-Ups:
- Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: Christöpher Gutteridge <totl@soton.ac.uk>
- Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- References:
- [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: Christöpher Gutteridge <totl@soton.ac.uk>
- [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- Prev by Date: Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- Next by Date: Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):