[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Re: epc:if tests for the existence of values in a compound field
- Subject: [EP-tech] Re: epc:if tests for the existence of values in a compound field
- From: Ian.Stuart at ed.ac.uk (Ian Stuart)
- Date: Wed, 25 Feb 2015 11:43:10 +0000
- In-reply-to: <EMEW3|ba1c1e9576aadc8134849ed7e0233bbfr1O9Py14eprints-tech-bounces|ecs.soton.ac.uk|54ED9534.90504@ed.ac.uk>
- References: <54ED9534.90504@ed.ac.uk> <EMEW3|ba1c1e9576aadc8134849ed7e0233bbfr1O9Py14eprints-tech-bounces|ecs.soton.ac.uk|54ED9534.90504@ed.ac.uk>
On 25/02/15 09:26, Ian Stuart wrote:
> I'm writing a citation schema, and when it comes to compound fields, I
> don't want to have a table with just the column headings.
>
> I tried
>
> <epc:if test="creator"><epc:print expr="creator" /></epc:if>
> <epc:if test="!(creator)"><epc:phrase ref="eprint_field_nodata"
> /></epc:if>
>
> ... but this doesn't seem to work
>
> (and yes, I've restarted the server..... but that shouldn't make a
> difference for a generate-static)
>
> I'm getting no errors from the xml file, and if I add in a sneaky <hr />
> them that appears in the re-built page.
>
> How do I avoid rendering these empty tables?
>
I've ended up using a combination of Adam's <epc:choose> and Gilles'
test="is_set(f00)"
Works in both Eprints 3.2 & 3.3
Thanks all...
--
Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
EDINA,
The University of Edinburgh.
http://edina.ac.uk/
This email was sent via the University of Edinburgh.
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.