Hi list,
I've been trying to add the option for topic category search in my geonetwork 2.2
installation. In version 2.1 I had done it by searching the topic categories as plan text,
but this doesn't seem to work in geon. 2.2.
What I've done sofar is:
I've added the search option in the searchform_advanced.xsl file, in order to be able
to select the topic category:
<tr>
<th class="padded">
<xsl:value-of select="/root/gui/strings/theme"/>
</th>
<td class="padded">
<select class="content" id="topicCat" name="topicCat">
<xsl:for-each select="/root/gui/strings/topicCategoryCode">
<option>
<xsl:attribute name="value">
<xsl:value-of select="@value"/>
</xsl:attribute>
<xsl:value-of select="."/>
</option>
</xsl:for-each>
</select>
</td>
</tr>
I have also put in the localization files the corresponding values:
<topicCategoryCode value="">-- Any --</topicCategoryCode>
<topicCategoryCode value="Farming">Farming</topicCategoryCode>
<topicCategoryCode value="Biota">Biota</topicCategoryCode>
....
I add the corresponding entry in lucene.xsl file:
<!-- topicCat -->
<xsl:call-template name="textField">
<xsl:with-param name="expr" select="/request/topicCat"/>
<xsl:with-param name="field" select="'topicCat'"/>
</xsl:call-template>
I then fetch the topic category parameter in the gn_search.js and send it
via the searchform (and it is sent correctly):
function runAdvancedSearch()
{
...
pars += fetchParam('topicCat');
...
Sofar so good. In the geonetwork 2.1 the next (and final) step would be to
open the 19139.xsl file and remove the codeListValue search in the topicCategory
that is from
gmd:topicCategory/gmd:MD_TopicCategoryCode/@codeListValue
to
gmd:topicCategory/gmd:MD_TopicCategoryCode
in order to search for the topic category as plain text, because there wasn't any
codeList for the topicCategories back then.
In Geonetwork 2.2 I cannot find the 19139.xsl file. Also, it seems that the
codeLists are ther, but I don't know how to use them for the topic category searches.
Any ideas?
Thank you very much,
Dimitrios Simos