Ok, done.
https://jira.duraspace.org/browse/DS-1559
Thanks,
Robert
2013/5/23 Bram Luyten <[email protected]>
> 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:
>
> https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl#L239
>
> Other fields are still suffering from this as well.
> For example this METS element has empty descriptions:
>
> http://www.massageresearchonline.com:8080/xmlui/metadata/handle/123456789/11/mets.xml
>
> and now look what it does to the menu:
> http://www.massageresearchonline.com:8080/xmlui/handle/123456789/44
>
> 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?
>
> rgds
>
> Bram Luyten
>
>
>
> --
> [image: logo]
> *Bram Luyten* *@mire*
> *2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010*
> *Esperantolaan 4, Heverlee 3001, Belgium*
> www.atmire.com<http://atmire.com/website/?q=services&utm_source=emailfooter&utm_medium=email&utm_campaign=braml>
>
>
> On Thu, May 23, 2013 at 12:47 PM, RUIZ MORENO, ROBERT <[email protected]
> > wrote:
>
>> 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
>>
>
>
------------------------------------------------------------------------------
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