Hi Robert,

nice catch. Adding spans around this may create problems in internet explorer (cfr https://jira.duraspace.org/browse/DS-809)
A cleaner solution is to add a non breaking space (  or  ) in xsl

For the abstract field, the XSL already contains a nice test:

Other fields are still suffering from this as well.
For example this METS element has empty descriptions:

and now look what it does to the menu:

I don't think there is currently an active JIRA issue for this. Do you want to create one? 

On a broader scale, it might be nice to have a curation task that detects these empty metadata values and removes them, they serve no purpose, right?


Bram Luyten

Bram Luyten @mire
2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium

On Thu, May 23, 2013 at 12:47 PM, RUIZ MORENO, ROBERT <robert.ruiz@upf.edu> wrote:

I think I discover a bug in item-view.xsl (DSpace v3.1)

If in an Item you add one of these metadata:


with an empty value, and then save and return to simple-view page, the page structure is dismount.

This bug not happens if the empty metadata is dc.contributor.author.

Seeing item-view.xsl code, the part of <!-- Author(s) row --> which manage dc.creator and dc.contributor.* metadata, needs <span>  </span> tags like appears in dc.contributor.author, just for this cases.

I think code should be like this:

          <!-- Author(s) row -->
          <xsl:when test="$clause = 2 and (dim:field[@element='contributor'][@qualifier='author'] or dim:field[@element='creator'] or dim:field[@element='contributor'])">
                    <div class="simple-item-view-authors">
                       <xsl:when test="dim:field[@element='contributor'][@qualifier='author']">
                           <xsl:for-each select="dim:field[@element='contributor'][@qualifier='author']">
                                          <xsl:if test="@authority">
                                            <xsl:attribute name="class"><xsl:text>ds-dc_contributor_author-authority</xsl:text></xsl:attribute>
                               <xsl:copy-of select="node()"/>
                               <xsl:if test="count(following-sibling::dim:field[@element='contributor'][@qualifier='author']) != 0">
                                   <xsl:text>; </xsl:text>
                       <xsl:when test="dim:field[@element='creator']">
                           <xsl:for-each select="dim:field[@element='creator']">
                               <xsl:copy-of select="node()"/>
                               <xsl:if test="count(following-sibling::dim:field[@element='creator']) != 0">
                                   <xsl:text>; </xsl:text>
                       <xsl:when test="dim:field[@element='contributor']">
                           <xsl:for-each select="dim:field[@element='contributor']">
                               <xsl:copy-of select="node()"/>
                               <xsl:if test="count(following-sibling::dim:field[@element='contributor']) != 0">
                                   <xsl:text>; </xsl:text>
              <xsl:call-template name="itemSummaryView-DIM-fields">
                <xsl:with-param name="clause" select="($clause + 1)"/>
                <xsl:with-param name="phase" select="$otherPhase"/>

Well, that's all.

Robert Ruiz

Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
DSpace-tech mailing list
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette