Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
John Salter via Eprints-tech <[email protected]>
| Newsgroups | gmane.comp.web.eprints.devel |
|---|---|
| Message-ID | <EMEW3|04685837785523be62b97f6204c61a08v5PEaB14eprints-tech-bounces|ecs.soton.ac.uk|DB6PR0302MB27110E4BEEE841F5FED46FADC4E20@DB6PR0302MB2711.eurprd03.prod.outlook.com> |
What is $citfrag? Is it an XML document, or a document fragment? Are you adding essentially a new document to an existing document (thereby having two root elements - which isn't valid XML)? This commit: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fcommit%2F6de50badbe28045a34a41fb8d892080c55b09fb7&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=X3ACuDTM2TX2Y%2Ff6zB9WUu96Fc7%2FrT5b2wnR9FAxh9Y%3D&reserved=0 might help you, adding a 'parse_frag_string' method. NB I'm in no way endorsing what you're suggesting to do. I know the effort required in building the DOM with many create_element's - but it also guarantees a well-constructed page. Trying to use hand-crafted XML is always dangerous! Cheers, John -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Yuri via Eprints-tech Sent: 26 June 2019 14:22 To: [email protected] Subject: Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render 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=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=fqiLOeP0yK7jDW29KIzXnv2M0AFArwiIc4%2FiCzvbEwo%3D&reserved=0 > *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=Q0crJaYNSqJWbrRIbo7nW8teW4TFhh3SvILuDk1h9lQ%3D&reserved=0 > *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=kmiCUt87iNxDfCR27PVQpLtonXVe4gKixL3dqGIR2co%3D&reserved=0 *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=fqiLOeP0yK7jDW29KIzXnv2M0AFArwiIc4%2FiCzvbEwo%3D&reserved=0 *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=Q0crJaYNSqJWbrRIbo7nW8teW4TFhh3SvILuDk1h9lQ%3D&reserved=0 *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd29809a23c404713b71308d6fa3b3503%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=kmiCUt87iNxDfCR27PVQpLtonXVe4gKixL3dqGIR2co%3D&reserved=0 *** 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/ *** EPrints developers Forum: http://forum.eprints.org/