EPrints Technical Mailing List Archive
Message: #07905
< 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: John Salter <J.Salter@leeds.ac.uk>
- Date: Wed, 26 Jun 2019 14:53:31 +0000
You could go down a slightly different route, using a phrase - like the login page does: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Flib%2Flang%2Fen%2Fphrases%2Fsystem.xml%23L2031-L2041&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=GJbkrEez9iij8Z%2BWnrYe63bmsMHpjKk8iZ79gcbwtzo%3D&reserved=0 You could keep the necessary phrases in a separate XML file (which has to be valid) to get loaded. Cheers, John -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri via Eprints-tech Sent: 26 June 2019 15:44 To: eprints-tech@ecs.soton.ac.uk Subject: Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render Thanks for the help and the interesting function, I've ended with create_element, was just a form with labels and input, not much tags. NB I know well constructed xml, xml with xsd and file with a validarion schema. A page is something a brower will show correctly. Making xhtml pages is costly with very little advantage and a lot of disavantages. Il 26/06/19 15:35, John Salter ha scritto: > 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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=EfdSgJXtT9S5Phb%2FpYqpzthIpTSwXtKwvCnB%2F4D3xf8%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: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri via Eprints-tech > Sent: 26 June 2019 14:22 > To: eprints-tech@ecs.soton.ac.uk > 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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=5CTB4gy4pXfjl93wmBFyqkkTDR6h3knxkcF6n49PtZ0%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=N1EOMCQ7hxEjaMU6612ouxAb0knedg8LG%2FNElBWvIOM%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=lXScRN5ilLmR%2Bg07YgmeNDfuRAxeggImpKO5uPq39fU%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=5CTB4gy4pXfjl93wmBFyqkkTDR6h3knxkcF6n49PtZ0%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=N1EOMCQ7hxEjaMU6612ouxAb0knedg8LG%2FNElBWvIOM%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=lXScRN5ilLmR%2Bg07YgmeNDfuRAxeggImpKO5uPq39fU%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=5CTB4gy4pXfjl93wmBFyqkkTDR6h3knxkcF6n49PtZ0%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=N1EOMCQ7hxEjaMU6612ouxAb0knedg8LG%2FNElBWvIOM%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%7C870c0ad1fac545f7e34308d6fa461091%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=lXScRN5ilLmR%2Bg07YgmeNDfuRAxeggImpKO5uPq39fU%3D&reserved=0
- Follow-Ups:
- Re: [EP-tech] Insert an html to dom (HIERARCHY_REQUEST_ERR) in eprint_render
- From: John Salter <J.Salter@leeds.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: John Salter <J.Salter@leeds.ac.uk>
- 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: John Salter <J.Salter@leeds.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: [EP-tech] Strange button behaviour
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):