Getting rid of empty keywords

Build 1501 on 14/Nov/2017  This topic last edited on: 20/Feb/2013, at 12:26

You may want to get rid of the empty keywords, read from the badly formatted metadata (e.g. in the IPTC keywords there are two consecutive commas, and therefore parser gets out an empty keyword that can cause problems.

<dc:subject>

    <rdf:Bag>

        <rdf:li>Entertainment

        </rdf:li>

        <rdf:li>Orientation Vertical

        </rdf:li>

        <rdf:li>Stood half body

        </rdf:li>

        <rdf:li>Film Still

        </rdf:li> <rdf:li>

        </rdf:li>

        <rdf:li>Sword Knife or Dagger

        </rdf:li>

    </rdf:Bag>

</dc:subject>

Locate in the XSLT the foreach on rdf:li (e.g. the keyword element) and make sure that foreach is as:

<xsl:for-each select="$xmp//dc:subject/rdf:Bag/rdf:li[string(normalize-space(.))]">