[GeoNetwork-users] New metadata schema - customize search results view, brief template

Hi,

I tried to register a new schema by using the documentation [1] and
downloading source code from the GitHub repo [2]. To get a quick start,
I copied one of the schema folder (e.g. iso19139) and modified it for my purposes - this works quite fine. Metadata details are filled correctly in the details view, but unfortunately information in the search results view are not displayed.

I found out that I should prepare a brief template in the metadata.xsl
(in new schema folder), but I think this is not used by the Geonetwork
scripts? The definition looks like this:

(name of the new schema is mcp)

<xsl:template name="mcpBrief">
         <metadata>
             <xsl:variable
name="download_check"><xsl:text>&amp;fname=&amp;access</xsl:text></xsl:variable>
             <xsl:variable name="id" select="geonet:info/id"/>
             <xsl:variable name="uuid" select="geonet:info/uuid"/>
             <xsl:if test="//mcp:wpsProcessDescription/ows:Title">
                 <title><xsl:value-of
select="//mcp:wpsProcessDescription/ows:Title"/></title>
             </xsl:if>
             <xsl:if
test="mcp:functionality/mcp:wpsProcessDescription/ows:Abstract">
                 <abstract><xsl:value-of
select="mcp:functionality/mcp:wpsProcessDescription/ows:Title"/></abstract>
             </xsl:if>
             <xsl:for-each select="dataIdInfo/descKeys/keyword[text()]">
                 <xsl:copy-of select="."/>
             </xsl:for-each>
         </metadata>
     </xsl:template>

Do I have to modify further xsl-files? Or do I have to use other naming
conventions, such as using the template name "mcp-brief"?

[1]
http://geonetwork-opensource.org/manuals/trunk/eng/developer/schemaPlugins/index.html#creating-the-presentations-xslts-in-the-present-directory

[2]https://github.com/geonetwork/core-geonetwork

Hi Paul,

I just got it … you have to define special fields in the index-fields.xsl (file in your schema-folder).
The fields title, abstract, … will be used to fill the search result list ui.
(after rebuilding the project you have to rebuild the index (admin console -> tools -> rebuild index)
Hope this will work in your case, too.

Christin

Am 14.07.2014 um 10:05 schrieb Paul Cleverley

This is my problem too and I didn't even get that far?

Any documentation / recommendations on how to do this would be very gratefully received :slight_smile: !

Paul

Am 11.07.2014 um 13:53 schrieb Christin Henzen

Hi,

I tried to register a new schema by using the documentation [1] and
downloading source code from the GitHub repo [2]. To get a quick start,
I copied one of the schema folder (e.g. iso19139) and modified it for my purposes - this works quite fine. Metadata details are filled correctly in the details view, but unfortunately information in the search results view are not displayed.

I found out that I should prepare a brief template in the metadata.xsl
(in new schema folder), but I think this is not used by the Geonetwork
scripts? The definition looks like this:

(name of the new schema is mcp)

<xsl:template name="mcpBrief">
        <metadata>
            <xsl:variable
name="download_check"><xsl:text>&amp;fname=&amp;access</xsl:text></xsl:variable>
            <xsl:variable name="id" select="geonet:info/id"/>
            <xsl:variable name="uuid" select="geonet:info/uuid"/>
            <xsl:if test="//mcp:wpsProcessDescription/ows:Title">
                <title><xsl:value-of
select="//mcp:wpsProcessDescription/ows:Title"/></title>
            </xsl:if>
            <xsl:if
test="mcp:functionality/mcp:wpsProcessDescription/ows:Abstract">
                <abstract><xsl:value-of
select="mcp:functionality/mcp:wpsProcessDescription/ows:Title"/></abstract>
            </xsl:if>
            <xsl:for-each select="dataIdInfo/descKeys/keyword[text()]">
                <xsl:copy-of select="."/>
            </xsl:for-each>
        </metadata>
    </xsl:template>

Do I have to modify further xsl-files? Or do I have to use other naming
conventions, such as using the template name "mcp-brief"?

[1]
http://geonetwork-opensource.org/manuals/trunk/eng/developer/schemaPlugins/index.html#creating-the-presentations-xslts-in-the-present-directory

[2]https://github.com/geonetwork/core-geonetwork

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork