[Dspace-tech] Any way to not display blank fields and dashes when extending webui.itemlist.columns

2007-10-09 Thread Shane Beers
I'm becoming increasingly frustrated with the limitations of the  
indexing and display features of DSpace. Our collection features a  
variety of content, some with dc.contributor.author, some with  
dc.contributor.editor, and so on. It is fairly essential that the  
webui.itemlist.columns dc.title, dc.contributor.* continue to be  
used, due to having these various dc.contributor.X's as creators.  
However, the ETD schema we are starting to employ uses dc.contributor  
as the field to capture thesis and dissertation advisors. In a non- 
flat hierarchy the dc.contributor.type field would be able to explain  
what a specific contributor did. This makes advisors show up in the  
itemlist where item creators are, which is both somewhat incorrect  
and confusing.


Now, you may say why not just put dc.title, dc.contributor.author,  
dc.contributor.editor as the webui.itemlist.columns? The issue there  
is that if you specify individual element like that, and that element  
is not found in the item, random dashes, empty fields, and line  
breaks occur.


I'd love to just be able to say show me these fields, but don't put  
in wacky extra spaces and dashes if the field doesn't have data (or  
doesn't exist) in that item.


Maybe I'm missing an obvious solution. This is why I'm asking for any  
assistance. Thanks in advance!



Shane Beers
Digital Repository Services Librarian
George Mason University
[EMAIL PROTECTED]
703-993-3742



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Any way to not display blank fields and dashes when extending webui.itemlist.columns

2007-10-09 Thread Dorothea Salo
On 10/9/07, Shane Beers [EMAIL PROTECTED] wrote:

 I'd love to just be able to say show me these fields, but don't put in
 wacky extra spaces and dashes if the field doesn't have data (or doesn't
 exist) in that item.

My suspicion is that in JSP you're stuck. I ran head-on into the same
problem for the same reason (dissertation advisors erroneously showing
up as authors), and I didn't find a non-major-hacking fix. I thought
at first that it might be possible to do a comma-separated list of
values for webui.itemlist.columns, but after I broke DSpace by trying
it, I learned the error of my ways.

If you can stand it for a few more months, though, I *think* this is
fixable in Manakin. WARNING: I HAVE NOT TESTED ANY OF THIS CODE YET.
(Subversion issues on the new server. They're supposed to be fixed
now.) Adopt or adapt it at your own risk.

Speaking in meta-pseudocode, Manakin's default author listing on the
item page (search DS-METS-1.0-DIM.xsl for item-author to find the
code) does roughly the same thing that JSP does. If there's a
dc.contributor.author, put them first. If there's a dc.creator, put
them. Then add any other dc.contributors regardless of qualifier.

I commented out the final xsl:when (dc.contributor.*, in dspace.cfg
parlance) and added some more table rows to cover my edge-case
contributors (I have translators and advisors; you may have others).
To address the blank-metadata problem, I've been wrapping rows in
xsl:if clauses (in meta-pseudocode, if this piece of metadata
exists, write the row with its implied if not, don't), a technique
I commend to the Manakin developers, because the empty rows look like
a system error, take up screen space unnecessarily, and confuse users.

So each of my new rows looks like this. Be warned; I haven't put keys
in messages.xml yet, but that would be the proper way to do this.

xsl:if test=$data/dim:[EMAIL PROTECTED]'contributor'[EMAIL 
PROTECTED]'advisor']
trtdspan
class=boldxsl:textAdvisor(s):/xsl:text/span/td
td
xsl:for-each
select=$data/dim:[EMAIL PROTECTED]'contributor'[EMAIL PROTECTED]'advisor']
xsl:copy-of select=./
xsl:if
test=count(following-sibling::dim:[EMAIL PROTECTED]'contributor'[EMAIL 
PROTECTED]'advisor'])
!= 0
xsl:text; /xsl:text
/xsl:if
/xsl:for-each
/td/tr
/xsl:if

As for the browse pages, I think my decision for the time being is
going to be to limit the author field to dc.creator and
dc.contributor.author. Should be fairly easy to do with the techniques
I just outlined.

Dorothea

-- 
Dorothea Salo[EMAIL PROTECTED]
Digital Repository Librarian  AIM: mindsatuw
University of Wisconsin
Rm 218, Memorial Library
(608) 262-5493

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech