#1247: Indexing / iso19139 / add XSL mode to easily add new field in a profile
-------------------------+--------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
Type: enhancement | Status: new
Priority: minor | Milestone: v2.9.0
Component: General | Version: v2.9.0
Keywords: PIGMA |
-------------------------+--------------------------------------------------
When making a profile, indexing could be quite easily delegated to
iso19139 using:
{{{
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:import href="../iso19139.fra/index-fields.xsl"/>
</xsl:stylesheet>
}}}
but there is no easy way to add one field (without duplicating the
mode="metadata" template).
This task adds an "index" mode template in order to easily add new field.
For example, index some keywords from a specific thesaurus in a new field
adding the following to the previous XSL:
{{{
<xsl:template mode="index"
match="gmd:MD_Keywords[gmd:thesaurusName/gmd:CI_Citation/
gmd:title/gco:CharacterString='My thesaurus']/
gmd:keyword[normalize-space(gco:CharacterString)
!= '']">
<Field name="myThesaurusKeyword" string="{string(.)}"
store="true" index="true"/>
</xsl:template>
}}}
If matching a upper level element, apply mode to its child to further
index deeper level if required:
{{{
<xsl:template mode="index" match="gmd:EX_Extent">
... do something
... and continue indexing
<xsl:apply-templates mode="index" select="*"/>
</xsl:template>
}}}
No changes made to mode="metadata" for compatibility with existing
profiles.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1247>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.