[GeoNetwork-devel] Metadata Template Auto Generated UUID

Hi all,

I have been working on creating a custom template for a schema I've been
trying to add to GeoNetwork. For the most part, I have everything figured
out. I've edited the XSL's so that custom fields show up, custom tabs
appear, etc.

My main problem is that I can not get GeoNetwork to populate the
gmd:fileIdentifier field in the create/edit view, and ultimately, the
generated XML file. Based off of my debugging of DataManager.java, I can see
the GeoNetwork is indeed generating a UUID, but it is not appearing edit
template. Rather, the field says, "- Value will be set when record is saved
- ". When I save the metadata, this value remains.The same problem also
occurs for gmd:dateStamp.

I've traced down when/where this "- Value will be set...." message comes
from in strings.xml and metadata-iso19139.xsl (and my extension/replacement
xsl). However, I just can't seem to find the bit of logic that prevents
geonetwork from completing this task for me.

I've based my schema implementation off of the iso19139, and have only
changed/added a few things. The iso19139 profile is able to place generated
UUIDs in its create/edit view, so I am thinking the problem must be
something small that I've simply overlooked. Any ideas?
--
View this message in context: http://n2.nabble.com/Metadata-Template-Auto-Generated-UUID-tp4517251p4517251.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

dwowen wrote:

Hi all,

I have been working on creating a custom template for a schema I've been
trying to add to GeoNetwork. For the most part, I have everything figured
out. I've edited the XSL's so that custom fields show up, custom tabs
appear, etc.

My main problem is that I can not get GeoNetwork to populate the
gmd:fileIdentifier field in the create/edit view, and ultimately, the
generated XML file. Based off of my debugging of DataManager.java, I can see
the GeoNetwork is indeed generating a UUID, but it is not appearing edit
template. Rather, the field says, "- Value will be set when record is saved
- ". When I save the metadata, this value remains.The same problem also
occurs for gmd:dateStamp.

I've traced down when/where this "- Value will be set...." message comes
from in strings.xml and metadata-iso19139.xsl (and my extension/replacement
xsl). However, I just can't seem to find the bit of logic that prevents
geonetwork from completing this task for me.

I've based my schema implementation off of the iso19139, and have only
changed/added a few things. The iso19139 profile is able to place generated
UUIDs in its create/edit view, so I am thinking the problem must be
something small that I've simply overlooked. Any ideas?
  

Hi Dominic,

I think update-fixed-info.xsl should do this

Cheers,
Simon

Simon,

You are exactly correct. I forgot that I had changed the
update-fixed-info.xsl file. For my profile I did not like that the xsl was
hard coding metadataStandardName and metadataStandardVersion with the
following templates:

  <xsl:template match="gmd:metadataStandardName" priority="10">
    <xsl:copy>
      <gco:CharacterString>ISO 19115:2003/19139</gco:CharacterString>
    </xsl:copy>
  </xsl:template>

  <!-- ================================================================= -->
  
  <xsl:template match="gmd:metadataStandardVersion" priority="10">
    <xsl:copy>
      <gco:CharacterString>1.0</gco:CharacterString>
    </xsl:copy>
  </xsl:template>

In my haste, I overwrote some other important templates.

Thanks,
Dominic
--
View this message in context: http://n2.nabble.com/Metadata-Template-Auto-Generated-UUID-tp4517251p4521770.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.