Hi Roger
Firstly, what results are you seeing exactly? Error-like or blank?
I can't give you a definitive answer because I am not familiar with the XML
source you are processing, but I can see a couple of problems with syntax:
* The square bracket in your XPath predicate starting with "@element" is not
closed. I suspect you want to say something more like
"dim:field[@element='type']/text()='Citation'" but again I can't see your
source XML.
* <xsl:if/> is better suited if you are just testing one condition with no
alternative conditions or fallback. <xsl:when/> elements must be surrounded by
<xsl:choose/> if you haven't done that.
If that doesn't fix it and no-one else replies, I can probably help you if you
provide the snippet of XML you are processing here.
Cheers
Hugh Barnes
Digital Access Coordinator
Library, Teaching and Learning
Lincoln University
Christchurch
New Zealand
p +64 3 423 0357
From: Roger Gillis [mailto:roger.gil...@gmail.com]
Sent: Tuesday, 5 November 2013 11:46 a.m.
To: dspace-tech@lists.sourceforge.net
Subject: [Dspace-tech] Displaying text based on dc.type value
Hi everyone,
I'm hoping someone might be able to help me out with this issue: I'm looking to
display a bit of text to indicate items that are citations only, as opposed to
those might contain actual digital items. I'm doing this by submitting an item
and indicating the value of dc.type as "Citation." I was hoping then to edit
item-list.xsl (I'm using the Mirage theme in Dspace 3.1) to display a bit of
text in order to distinguish items that are citations. So far I've got this:
<xsl:when test="dim:field[@element = 'type'/node()='Citation'">
<strong>
CITATION ONLY
</strong>
</xsl:when>
However, I'm not really seeing any results. Perhaps my use of the <xsl:when> to
specify the value of the node is off?
Any help would be appreciated.
Thanks!
-Roger
Roger Gillis
Archives & Scholarly Communication Librarian
Mount Saint Vincent University Library
________________________________
P Please consider the environment before you print this email.
"The contents of this e-mail (including any attachments) may be confidential
and/or subject to copyright. Any unauthorised use, distribution, or copying of
the contents is expressly prohibited. If you have received this e-mail in
error, please advise the sender by return e-mail or telephone and then delete
this e-mail together with all attachments from your system."
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette