Hi Archie:
I checked the fgdc schemas for csw in [geonetworkfolder]/xml/csw/schemas/fgdc-std
and they use the attribute “cat_id” in the title element.
I set manually the attribute “cat_id” and it is returned by the csw getrecords operation
correctly but I can’t use the cat_id to get the record using csw getRecordById operation. To fix
this problem I changed the set_uuid and extract_uuid schemas in
[geonetworkfolder]/xml/schemas/fgdc-std to set “cat_id” as the uuid generated in the database and
it works to return the uuid in getRecords and getRecordById but only with metadata inserted
using gast, the fgdc metadata created directly in geonetwork does not set the “cat_id”.
Any ideas to fix this?
Regards
Godofredo Contreras
—init-set_uuid.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:template match=“/root”>
<xsl:apply-templates select=“metadata”/>
</xsl:template>
<xsl:template match=“title”>
xsl:copy
<xsl:copy-of select=“@*”/>
<xsl:attribute name=“cat_id”>
<xsl:value-of select=“/root/env/uuid” />
</xsl:attribute>
<xsl:apply-templates select=“node()” />
</xsl:copy>
</xsl:template>
<xsl:template match=“@|node()“>
xsl:copy
<xsl:apply-templates select=”@|node()”/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
—end-set_uuid.xsl
–init-extract_uuid.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:template match=“metadata”>
<xsl:value-of select=“idinfo/citation/citeinfo/title/@cat_id” />
</xsl:template>
</xsl:stylesheet>
–end-extract_uuid.xsl
Date: Mon, 24 Nov 2008 21:44:13 -0500
From: warnock@anonymised.com
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] How to getrecords using csw in geonetwork with FGDC metadata
godofredo contreras wrote:
I found several problems using FGDC metadata through csw service,
one of them is that FGDC does not have a uid and isn’t possible to
get the results by id. The other problem is the output schema, there
are not output schema for csw.
Turns out that FGDC had to finesse that issue a few years ago when
Geospatial OneStop (GOS) was harvesting FGDC nodes. We ended up adding
an attribute to the title element called “catid” and putting an
identifier string in there. In the Isite software, I use a UUID
constructed from the file name and path of the local metadata file but,
of course, any unique identifier would work as well.
The addition of the attribute technically breaks the FGDC DTD (and, if
one exists, the schema) but since no one to our knowledge)actually was
validating the records against the DTD, it seemed like an expeditious
solution and it worked for GOS.
–
Archie
– Archie Warnock warnock@anonymised.com
– A/WWW Enterprises www.awcubed.com
– As a matter of fact, I do speak for my employer.
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Windows Live Hotmail now works up to 70% faster. Sign up today.