Hi,

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

If in an Item you add one of these metadata:

dc.creator
dc.contributor
dc.contributor.advisor
dc.contributor.editor
dc.contributor.illustrator
dc.contributor.other

*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:choose>
                        <xsl:when
test="dim:field[@element='contributor'][@qualifier='author']">
                            <xsl:for-each
select="dim:field[@element='contributor'][@qualifier='author']">
                                        <span>
                                          <xsl:if test="@authority">
                                            <xsl:attribute
name="class"><xsl:text>ds-dc_contributor_author-authority</xsl:text></xsl:attribute>
                                          </xsl:if>
                                <xsl:copy-of select="node()"/>
                                        </span>
                                <xsl:if
test="count(following-sibling::dim:field[@element='contributor'][@qualifier='author'])
!= 0">
                                    <xsl:text>; </xsl:text>
                                </xsl:if>
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:when test="dim:field[@element='creator']">
                            <xsl:for-each
select="dim:field[@element='creator']">
                                *<span>*
                                <xsl:copy-of select="node()"/>
                                <xsl:if
test="count(following-sibling::dim:field[@element='creator']) != 0">
                                    <xsl:text>; </xsl:text>
                                </xsl:if>
                                *</span>*
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:when test="dim:field[@element='contributor']">
                            <xsl:for-each
select="dim:field[@element='contributor']">
                             *<span>*
                                <xsl:copy-of select="node()"/>
                                <xsl:if
test="count(following-sibling::dim:field[@element='contributor']) != 0">
                                    <xsl:text>; </xsl:text>
                                </xsl:if>
                                *</span>*
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>

 <i18n:text>xmlui.dri2xhtml.METS-1.0.no-author</i18n:text>
                        </xsl:otherwise>
                    </xsl:choose>
            </div>
              <xsl:call-template name="itemSummaryView-DIM-fields">
                <xsl:with-param name="clause" select="($clause + 1)"/>
                <xsl:with-param name="phase" select="$otherPhase"/>
              </xsl:call-template>
          </xsl:when>



Well, that's all.

Thanks,
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to