[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: gilles.fournie at cirad.fr (Gilles Fournié)
- Date: Wed, 25 Feb 2015 11:04:58 +0100
- In-reply-to: <EMEW3|f44413b1018dd8a03ed792b9bcd8c271r1O9Pu14eprints-tech-bounces|ecs.soton.ac.uk|54ED9534.90504@ed.ac.uk>
- References: <54ED9534.90504@ed.ac.uk> <EMEW3|f44413b1018dd8a03ed792b9bcd8c271r1O9Pu14eprints-tech-bounces|ecs.soton.ac.uk|54ED9534.90504@ed.ac.uk>
Hi,
If your compound is a field with multiple values, you can try :
<epc:if test="length(creator) gt 0">
(I have already used this)
or perhaps :
<epc:if test="is_set(creator)">
(I have not tested this one on compounds)
Regards,
GF
Le 25/02/2015 10:26, Ian Stuart a ?crit :
> 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?
>