This project is read-only.

In bibword xlst how to check for a null element

Dec 8, 2014 at 10:16 PM
How can I check if author is null. If it is I need to show title

If it has data I need it not to show anything

Obviously a test and an if statement are involved but where ?
Dec 9, 2014 at 3:57 PM
BibWord uses { and } to allow for conditions. For more information and some examples, see the documentation . Make sure to check the example on volume, issue, and pages as it shows how complex you can go.
Dec 9, 2014 at 4:49 PM
Thanks Yves I had already checked the volume,issue and pages section but can not figure a method which does the following

if author = is not NULL then display nothing
if author = NULL then display TITLE
Dec 9, 2014 at 5:10 PM
Edited Dec 9, 2014 at 5:20 PM
This is a command that nearly works {%author|Title%}
However if author exists it display the author, I dont want it to ever display the author.
I want it to display the title if author does not exist

The programming I need is something like this:-

{<xsl:if test='Author=NULL' > {%Title%} </xsl:if>}
Dec 9, 2014 at 6:05 PM
I think I understand what you are looking for. There is a trick you could use. You could create a format style for authors which produces no output. Then you could use {%Author:15|Title%} where 15 is the id of the contributor formatting you defined to output nothing.
Marked as answer by paulmccherry on 12/11/2014 at 4:19 AM
Dec 9, 2014 at 6:35 PM
Brilliant, thanks Yves. I will give that a try tomorrow.
Dec 11, 2014 at 12:17 PM
That was spot on, its working now thanks yves