[GeoNetwork-devel] [GeoNetwork-users] error in xml ISO19139 package "data quality"

Hi Emanuele,

emanuele wrote:

thanks Simon, this ok
there is another problem

when I run geonet2.1 and:
  

I go to tab of geonet2.1: advanced view -> data quality
I select "Absolute external positional accuracy" and I add "report[+]"
I select "Quantitative result" and I add "result[+]"
    
the tha xml <gml:UnitDefinition> is empty, instead it should contain at
least the tag <gml:identifier>
it allows of validare the metadata

this is correct:
<gml:UnitDefinition gml:id="id1">
   <gml:identifier
codeSpace="http://www.bipm.org/en/si/base_units&quot;&gt;m&lt;/gml:identifier&gt;
</gml:UnitDefinition>
  

Yep - correct - the element was being missed by the schema parser - I
have fixed this and again will commit shortly.

.....

other tags that don't appear inside <gml:UnitDefinition> (but they aren't
necessary for the validation):
        <gml:UnitDefinition id="ID1">
           <gml:description>String</gml:description>
           <gml:descriptionReference owns="false"/>
           <gml:name codeSpace="http://www…">String</gml:name>
        </gml:UnitDefinition>
  

As above.

problem n.2
if I add tag <gml:identifier> from xml view es.
<gml:UnitDefinition gml:id="id1">
   <gml:identifier
codeSpace="http://www.bipm.org/en/si/base_units&quot;&gt;m&lt;/gml:identifier&gt;
</gml:UnitDefinition>
when I go in "advanced view -> data quality" I can't see tha value "m"
therefore I can't edit it.

Yes - its a problem in the GN editor that needs fixing - the situation
when you have an attribute and some content to edit at the same time. GN
editor needs to deal with this situation - its not hard but it needs
some thought as the problem will occur many times with gml - temporary
fix until we get a general one in place is to add a template like the
following to metadata-iso19139.xsl in web/geonetwork/xsl:

<xsl:template mode="iso19139" match="gml:UnitDefinition">
    <xsl:param name="schema"/>
    <xsl:param name="edit"/>

    <xsl:apply-templates mode="complexElement" select=".">
      <xsl:with-param name="schema" select="$schema"/>
      <xsl:with-param name="edit" select="$edit"/>
      <xsl:with-param name="content">

        <!-- existing attributes -->
        <xsl:apply-templates mode="simpleElement" select="@*">
          <xsl:with-param name="schema" select="$schema"/>
          <xsl:with-param name="edit" select="$edit"/>
        </xsl:apply-templates>

        <!-- existing content -->
        <xsl:apply-templates mode="simpleElement" select=".">
          <xsl:with-param name="schema" select="$schema"/>
          <xsl:with-param name="edit" select="$edit"/>
        </xsl:apply-templates>

      </xsl:with-param>
    </xsl:apply-templates>
  </xsl:template>

problem n.3
code incorrect:
<gmd:DQ_QuantitativeResult>
    ......
  <gmd:value>2</gmd:value>
</gmd:DQ_QuantitativeResult>

code correct:
<gmd:DQ_QuantitativeResult>
    .....
    <gmd:value>
          <gco:Record>2</gco:Record>
    </gmd:value>
</gmd:DQ_QuantitativeResult>

in 1, 2, 3 problem, is it correct my analysis?
  

There appears to be an error in the 19139 XSD's: gco:Record doesn't have
an identifiable type in the supplied XSDs - GN parses the schema and
warns about this on startup and its the only one (I know of) for which we don't have
a type in the supplied 19139 XSDs. We should be able to offer a simple
string type in such situations so I'll check on it and let you know shortly.

Cheers and thanks,
Simon