[GeoNetwork-devel] Thesauri and keywords in template records

Hello,

I am working to create a template record with a variety of keywords taken
from a variety of thesauri. I uploaded my remote thesauri successfully, but
I have a few questions about how I use these most effectively.

First, I am a bit confused about retrieving an rdf file using a URL. Does
this approach download the remote RDF file or reference it as an external
service when you create new metadata? I am hoping it references a remote
service so that when the thesaurus changes I do not need to update a local
copy.

Second, in my template record, I want those creating a new metadata record
from it to use the appropriate thesauri as I indicate in the Thesaurus Name
for that keyword entry form. I see no way to make this restriction. Users
are able to select from any keyword list they want. This is more difficult
in my case as I am using the ANZLIC profile. In the ANZLIC view, there is a
drop down list of acceptable thematic values. This list appears no matter
the keyword type, Thematic or otherwise. Is there some way to alter this
drop down to reflect a given rdf thesaurus and restrict to (or at least set
as default) a particular thesaurus?

Lastly, and I believe this is a longshot, my client wants the number of
keywords selected from these external thesauri limited to three. I realise
that by nature there is no restriction on number of keywords in either
GeoNetwork or the metadata schema. Short of creating a custom profile, is
there a perhaps a programmatic way to do this?

So basically what I am looking to do is create a template record with a set
of keyword forms each pointing to (and preferably restricted to) a
particular thesaurus, so that a user creating metadata is guided in
populating the keywords for records following that template.

Thanks in advance to those who can provide me some guidance.

Cheers,
Byron Cochrane
LISAsoft

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7041495.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

I have made some good progress on these issues (keywords and thesauri).

Working with the xsl file /metadata-iso19139.anzlic-edit.xsl/ (we are using
the anzlic profile for this project), I was able to make modifications that
provide much of what I was looking for. But with a little more work (which I
am not sure I can justify the time for at the moment) I could make this a
more general improvement that would ease the handling of keywords and
thesauri in iso19139 based metadata.

My concept and approach is this. When a user clicks on the binocular icon to
add a set of keyword to a metadata record and ties these keywords to a
thesauri, the keywords added in that block should be restricted to the
vocabularies provided by that thesaurus. If a user wants to add keywords for
a particular theme that is not in that thesaurus or in a different
thesaurus, they add another keyword block. If they want to add free text
keywords, they add a block that does not include a thesaurus.

This is what the result looks like in the widgets gui:
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus.png

To improve the display and limit users to use thesaurus values, I changed
the input of the keyword value to hidden. The current value appears in the
dropdown.

The code values available come from the referenced thesaurus. To do this I
use the the xml service /geonetwork/srv/en/xml.search.keywords?/ against the
referenced library.
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus2.png

While this implementation suits my current needs, I think I would like to
make it more universal. It currently works only in the ANZLIC profile and
the linkage is currently hard coded to /Discipline/ keywords (like the
ANZLIC-Themes keywords are hardcoded to /Theme/ keywords). To improve on
this I would extract the value from the Thesaurus metadata for that keyword
block.

I have attached my modified version of metadata-iso19139.anzlic-edit.xsl if
anyone is interested.

Cheers,
Byron Cochrane
LISAsoft
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/metadata-iso19139.anzlic-edit.xsl
metadata-iso19139.anzlic-edit.xsl

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7052859.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Byron,

Taking a look at this now. Definitely interested in incorporating this into ANZLIC and more generally - I reckon Francois would be interested too.

Cheers and thanks,
Simon

________________________________________
From: ByronCinNZ [cochranes4@anonymised.com]
Sent: Friday, 2 December 2011 11:17 AM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Thesauri and keywords in template records

I have made some good progress on these issues (keywords and thesauri).

Working with the xsl file /metadata-iso19139.anzlic-edit.xsl/ (we are using
the anzlic profile for this project), I was able to make modifications that
provide much of what I was looking for. But with a little more work (which I
am not sure I can justify the time for at the moment) I could make this a
more general improvement that would ease the handling of keywords and
thesauri in iso19139 based metadata.

My concept and approach is this. When a user clicks on the binocular icon to
add a set of keyword to a metadata record and ties these keywords to a
thesauri, the keywords added in that block should be restricted to the
vocabularies provided by that thesaurus. If a user wants to add keywords for
a particular theme that is not in that thesaurus or in a different
thesaurus, they add another keyword block. If they want to add free text
keywords, they add a block that does not include a thesaurus.

This is what the result looks like in the widgets gui:
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus.png

To improve the display and limit users to use thesaurus values, I changed
the input of the keyword value to hidden. The current value appears in the
dropdown.

The code values available come from the referenced thesaurus. To do this I
use the the xml service /geonetwork/srv/en/xml.search.keywords?/ against the
referenced library.
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus2.png

While this implementation suits my current needs, I think I would like to
make it more universal. It currently works only in the ANZLIC profile and
the linkage is currently hard coded to /Discipline/ keywords (like the
ANZLIC-Themes keywords are hardcoded to /Theme/ keywords). To improve on
this I would extract the value from the Thesaurus metadata for that keyword
block.

I have attached my modified version of metadata-iso19139.anzlic-edit.xsl if
anyone is interested.

Cheers,
Byron Cochrane
LISAsoft
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/metadata-iso19139.anzlic-edit.xsl
metadata-iso19139.anzlic-edit.xsl

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7052859.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Byron,

Had a look at your improvement. I do think its worth pursuing the idea of extracting the thesaurus metadata (citation) - but my own feeling is that this should be extracted through a linkage to an ISO19135 register record (see the iso19135 plugin schema in ) as that:

- describes the thesaurus entries (including a history of changes, contributors etc)
- has details of the citation etc
- can be harvested and exchanged as a GeoNetwork metadata record
- can be managed as part of the catalog by organisations/custodians etc

I'm hoping these changes will begin to allow participants in groups like the register working group in Australia (coordinated by OSDM/OSP) to manage and make their thesauri/controlled vocabs visible to others and so (optimistically) to promote sharing and mapping between concepts.

You can load the ISO19135 plugin schema and see a sample record created from the CT_CodelistCatalog for the ANZLIC-themes keywords. I've written a proposal about this here at registers – GeoNetwork opensource Developer website

On the thesaurus picker: looks to me like the current picker creates distinct descriptiveKeywords blocks for each thesaurus that you select entries from - which is pretty flexible and seems to do most of what you want to achieve. I'm thinking that the problem you're trying to address is what happens when the user wants to return to add more keywords to that descriptiveKeywords block? What's missing is a link to the URL of the thesaurus - if this was around then the process of adding extra keywords could be coded to constrain new keywords to come from that thesaurus eg. by starting up the thesaurus picker window constrained to a certain thesaurus or like in your implementation with a select list of values obtained from the thesaurus.

Others will be bound to have ideas on this or pick up on something I've missed......

Cheers and thanks,
Simon
________________________________________
From: Simon.Pigot@anonymised.com [Simon.Pigot@anonymised.com]
Sent: Friday, 2 December 2011 8:25 PM
To: cochranes4@anonymised.com; geonetwork-devel@lists.sourceforge.net
Subject: [ExternalEmail] Re: [GeoNetwork-devel] Thesauri and keywords in template records

Hi Byron,

Taking a look at this now. Definitely interested in incorporating this into ANZLIC and more generally - I reckon Francois would be interested too.

Cheers and thanks,
Simon

________________________________________
From: ByronCinNZ [cochranes4@anonymised.com]
Sent: Friday, 2 December 2011 11:17 AM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Thesauri and keywords in template records

I have made some good progress on these issues (keywords and thesauri).

Working with the xsl file /metadata-iso19139.anzlic-edit.xsl/ (we are using
the anzlic profile for this project), I was able to make modifications that
provide much of what I was looking for. But with a little more work (which I
am not sure I can justify the time for at the moment) I could make this a
more general improvement that would ease the handling of keywords and
thesauri in iso19139 based metadata.

My concept and approach is this. When a user clicks on the binocular icon to
add a set of keyword to a metadata record and ties these keywords to a
thesauri, the keywords added in that block should be restricted to the
vocabularies provided by that thesaurus. If a user wants to add keywords for
a particular theme that is not in that thesaurus or in a different
thesaurus, they add another keyword block. If they want to add free text
keywords, they add a block that does not include a thesaurus.

This is what the result looks like in the widgets gui:
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus.png

To improve the display and limit users to use thesaurus values, I changed
the input of the keyword value to hidden. The current value appears in the
dropdown.

The code values available come from the referenced thesaurus. To do this I
use the the xml service /geonetwork/srv/en/xml.search.keywords?/ against the
referenced library.
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus2.png

While this implementation suits my current needs, I think I would like to
make it more universal. It currently works only in the ANZLIC profile and
the linkage is currently hard coded to /Discipline/ keywords (like the
ANZLIC-Themes keywords are hardcoded to /Theme/ keywords). To improve on
this I would extract the value from the Thesaurus metadata for that keyword
block.

I have attached my modified version of metadata-iso19139.anzlic-edit.xsl if
anyone is interested.

Cheers,
Byron Cochrane
LISAsoft
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/metadata-iso19139.anzlic-edit.xsl
metadata-iso19139.anzlic-edit.xsl

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7052859.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Left out the location of the iso19135 plugin schema - it is in the GeoNetwork subversion repository - view it at GeoNetwork - Geographic Metadata Catalog download | SourceForge.net
________________________________________
From: Pigot, Simon (CMAR, Hobart)
Sent: Monday, 5 December 2011 12:11 PM
To: Pigot, Simon (CMAR, Hobart); cochranes4@anonymised.com; geonetwork-devel@anonymised.comts.sourceforge.net
Subject: RE: [GeoNetwork-devel] Thesauri and keywords in template records

Hi Byron,

Had a look at your improvement. I do think its worth pursuing the idea of extracting the thesaurus metadata (citation) - but my own feeling is that this should be extracted through a linkage to an ISO19135 register record (see the iso19135 plugin schema in ) as that:

- describes the thesaurus entries (including a history of changes, contributors etc)
- has details of the citation etc
- can be harvested and exchanged as a GeoNetwork metadata record
- can be managed as part of the catalog by organisations/custodians etc

I'm hoping these changes will begin to allow participants in groups like the register working group in Australia (coordinated by OSDM/OSP) to manage and make their thesauri/controlled vocabs visible to others and so (optimistically) to promote sharing and mapping between concepts.

You can load the ISO19135 plugin schema and see a sample record created from the CT_CodelistCatalog for the ANZLIC-themes keywords. I've written a proposal about this here at registers – GeoNetwork opensource Developer website

On the thesaurus picker: looks to me like the current picker creates distinct descriptiveKeywords blocks for each thesaurus that you select entries from - which is pretty flexible and seems to do most of what you want to achieve. I'm thinking that the problem you're trying to address is what happens when the user wants to return to add more keywords to that descriptiveKeywords block? What's missing is a link to the URL of the thesaurus - if this was around then the process of adding extra keywords could be coded to constrain new keywords to come from that thesaurus eg. by starting up the thesaurus picker window constrained to a certain thesaurus or like in your implementation with a select list of values obtained from the thesaurus.

Others will be bound to have ideas on this or pick up on something I've missed......

Cheers and thanks,
Simon
________________________________________
From: Simon.Pigot@anonymised.com [Simon.Pigot@anonymised.com]
Sent: Friday, 2 December 2011 8:25 PM
To: cochranes4@anonymised.com; geonetwork-devel@lists.sourceforge.net
Subject: [ExternalEmail] Re: [GeoNetwork-devel] Thesauri and keywords in template records

Hi Byron,

Taking a look at this now. Definitely interested in incorporating this into ANZLIC and more generally - I reckon Francois would be interested too.

Cheers and thanks,
Simon

________________________________________
From: ByronCinNZ [cochranes4@anonymised.com]
Sent: Friday, 2 December 2011 11:17 AM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Thesauri and keywords in template records

I have made some good progress on these issues (keywords and thesauri).

Working with the xsl file /metadata-iso19139.anzlic-edit.xsl/ (we are using
the anzlic profile for this project), I was able to make modifications that
provide much of what I was looking for. But with a little more work (which I
am not sure I can justify the time for at the moment) I could make this a
more general improvement that would ease the handling of keywords and
thesauri in iso19139 based metadata.

My concept and approach is this. When a user clicks on the binocular icon to
add a set of keyword to a metadata record and ties these keywords to a
thesauri, the keywords added in that block should be restricted to the
vocabularies provided by that thesaurus. If a user wants to add keywords for
a particular theme that is not in that thesaurus or in a different
thesaurus, they add another keyword block. If they want to add free text
keywords, they add a block that does not include a thesaurus.

This is what the result looks like in the widgets gui:
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus.png

To improve the display and limit users to use thesaurus values, I changed
the input of the keyword value to hidden. The current value appears in the
dropdown.

The code values available come from the referenced thesaurus. To do this I
use the the xml service /geonetwork/srv/en/xml.search.keywords?/ against the
referenced library.
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/GN-Keyword-Thesaurus2.png

While this implementation suits my current needs, I think I would like to
make it more universal. It currently works only in the ANZLIC profile and
the linkage is currently hard coded to /Discipline/ keywords (like the
ANZLIC-Themes keywords are hardcoded to /Theme/ keywords). To improve on
this I would extract the value from the Thesaurus metadata for that keyword
block.

I have attached my modified version of metadata-iso19139.anzlic-edit.xsl if
anyone is interested.

Cheers,
Byron Cochrane
LISAsoft
http://osgeo-org.1803224.n2.nabble.com/file/n7052859/metadata-iso19139.anzlic-edit.xsl
metadata-iso19139.anzlic-edit.xsl

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7052859.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Simon,

Thanks for the feedback. I agree with all you say here and will look at the
19135 proposal you mention.

I did some more work over the weekend to make the tool a bit more general
purpose. The big improvement is that I decoupled the thesauri from the
keyword type and now works on the level of keyword blocks. I did this by
retrieving the thesaurus name as it is stored in the xlink of the
"gmd:descriptiveKeywords" (if present) and using xml.search.keywords on that
thesaurus to retrieve that list. This does a better job of decoupling the
presentation from the data and allows me to use any thesaurus that may be
loaded into GeoNetwork. Multiple discipline keyword blocks from different
thesauri can now be supported in a single metadata record. For keyword
blocks without a xlink to a thesaurus, a free text input presents the
keyword rather than a select options list. This approach does make much of
the flexibility I want and you mention here, available.

Much of what you mention here is not covered by this approach - like
external management of controlled vocabularies. But by using the GeoNetwork
services, it could still support approaches that would do these thing. In
the meantime it works with what we have got. I will definitely review the
19135 work you have done to see how that may fit in for future work.

This is how I accomplished this (right now it is restricted to working with
discipline keywords for development and testing purposes):

  /<!!-- ================================================================ -->
  <!!-- Field or Research keyword; only called in edit mode (see
-->
  <!!-- descriptiveKeywords -->
  <!!-- ================================================================ -->

  <xsl:template mode="iso19139.anzlic"
match="gmd:keyword[following-sibling::gmd:type/gmd:MD_KeywordTypeCode/@codeListValue='discipline']">
  
    <xsl:param name="schema"/>
    <xsl:param name="edit"/>
    
    <xsl:choose>
      <xsl:when test="$edit=true()">
    
        <xsl:variable name="text">
        <xsl:variable name="ref"
select="gco:CharacterString/geonet:element/@ref"/>
        <xsl:variable name="keyword" select="gco:CharacterString/text()"/>
        *<!!-- Extract value for thesaurus name in GeoNetwork from xlink:href
attribute on gmd:descriptiveKeywords parent -->
        <xsl:variable name="thesaurus"
select="substring-after(substring-before(../../@xlink:href,'&amp;'),'=')"/>
        <!!-- If these is a value for the thesuarus xlink, perform the following
to populate drop down menu -->
        <xsl:choose>
          <xsl:when test="$thesaurus!=''">
            <xsl:variable name="args"
select="concat('pNewSearch=true&amp;pTypeSearch=1&amp;pThesauri=',$thesaurus,'&amp;pMode=searchBox&amp;pKeyword=*&amp;maxResults')"/>
            <!!-- Use xml.search.keywords to populate dropdown select list for
keywords in edit mode -->
            <xsl:variable name="codes"
select="document(concat('http://localhost:8080/geonetwork/srv/en/xml.search.keywords?',$args))"/>
      *
            <input class=&quot;md&quot; type=&lt;b>"hidden"* name="_{$ref}"
value="{gco:CharacterString/text()}" size="50" />
            
            <!!-- for codes combobox -->

            <select name="keyword-list" size="1"
onChange="document.mainForm._{$ref}.value=this.options[this.selectedIndex].text">
              <option value=""/>
              *<xsl:for-each select="$codes/response/descKeys/keyword">
          *
                <xsl:variable name="entry" select="value/text()"/>
                <option value="{$entry}">
                  <xsl:if test="$entry=$keyword">
                    <xsl:attribute name="selected"/>
                  </xsl:if>
                  <xsl:value-of select="$entry"/>
                </option>
          
              </xsl:for-each>
            </select>
          *</xsl:when>
          <xsl:otherwise>
            <input class="md" type="text" name="_{$ref}"
value="{gco:CharacterString/text()}" size="50" />
          </xsl:otherwise>
        </xsl:choose>*
        </xsl:variable>
        <xsl:apply-templates mode="simpleElement" select=".">
          <xsl:with-param name="schema" select="$schema"/>
          <xsl:with-param name="edit" select="true()"/>
          <xsl:with-param name="text" select="$text"/>

        </xsl:apply-templates>

      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates mode="simpleElement" select=".">
          <xsl:with-param name="schema" select="$schema"/>
          <xsl:with-param name="edit" select="$edit"/>
              <xsl:with-param name="text">
                      <xsl:value-of select="gco:CharacterString"/>
               </xsl:with-param>
        </xsl:apply-templates>
      </xsl:otherwise>
    </xsl:choose>
/

Cheers,
Byron Cochrane
LISAsoft

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7061559.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Byron,

The decoupling idea looks good. Interesting about the xlink:href on the gmd:descriptiveKeywords parent element - that is dependent on the user choosing 'Add as a linked element' in the thesaurus picker? and I suspect any content you added/changed below that element would be lost because the xlink is a simple one that replaces all child content.

I was thinking maybe we could look at using one of the gmx substitutes for gco:CharacterString in the thesaurus 'title' element or 'other citation details' element instead to capture the URL of the thesaurus - this would mean making changes to some small changes to services eg. xml.keyword.get service and the picker perhaps to provide that behaviour but it probably needs more thought and it would be good to get input from others on how/if they are doing this already as there is always more than one way to do this.

Cheers,
Simon

PS: You could use the /root/gui/url etc XPaths in your template to avoid having to hard code the machine name and protocol (put an exclamation mark on the end of any service URL to see the XML that gets passed to the XSLTs - eg. http://localhost:8080/geonetwork/srv/en/main.home! will show the XML that most XSLTs receive).
________________________________________
From: ByronCinNZ [cochranes4@anonymised.com]
Sent: Monday, 5 December 2011 1:03 PM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Thesauri and keywords in template records

Hi Simon,

Thanks for the feedback. I agree with all you say here and will look at the
19135 proposal you mention.

I did some more work over the weekend to make the tool a bit more general
purpose. The big improvement is that I decoupled the thesauri from the
keyword type and now works on the level of keyword blocks. I did this by
retrieving the thesaurus name as it is stored in the xlink of the
"gmd:descriptiveKeywords" (if present) and using xml.search.keywords on that
thesaurus to retrieve that list. This does a better job of decoupling the
presentation from the data and allows me to use any thesaurus that may be
loaded into GeoNetwork. Multiple discipline keyword blocks from different
thesauri can now be supported in a single metadata record. For keyword
blocks without a xlink to a thesaurus, a free text input presents the
keyword rather than a select options list. This approach does make much of
the flexibility I want and you mention here, available.

Much of what you mention here is not covered by this approach - like
external management of controlled vocabularies. But by using the GeoNetwork
services, it could still support approaches that would do these thing. In
the meantime it works with what we have got. I will definitely review the
19135 work you have done to see how that may fit in for future work.

This is how I accomplished this (right now it is restricted to working with
discipline keywords for development and testing purposes):

        /<!!-- ================================================================ -->
        <!!-- Field or Research keyword; only called in edit mode (see
-->
        <!!-- descriptiveKeywords -->
        <!!-- ================================================================ -->

        <xsl:template mode="iso19139.anzlic"
match="gmd:keyword[following-sibling::gmd:type/gmd:MD_KeywordTypeCode/@codeListValue='discipline']">

                <xsl:param name="schema"/>
                <xsl:param name="edit"/>

                <xsl:choose>
                        <xsl:when test="$edit=true()">

                                <xsl:variable name="text">
                                <xsl:variable name="ref"
select="gco:CharacterString/geonet:element/@ref"/>
                                <xsl:variable name="keyword" select="gco:CharacterString/text()"/>
                                *<!!-- Extract value for thesaurus name in GeoNetwork from xlink:href
attribute on gmd:descriptiveKeywords parent -->
                                <xsl:variable name="thesaurus"
select="substring-after(substring-before(../../@xlink:href,'&amp;'),'=')"/>
                                <!!-- If these is a value for the thesuarus xlink, perform the following
to populate drop down menu -->
                                <xsl:choose>
                                        <xsl:when test="$thesaurus!=''">
                                                <xsl:variable name="args"
select="concat('pNewSearch=true&amp;pTypeSearch=1&amp;pThesauri=',$thesaurus,'&amp;pMode=searchBox&amp;pKeyword=*&amp;maxResults')"/>
                                                <!!-- Use xml.search.keywords to populate dropdown select list for
keywords in edit mode -->
                                                <xsl:variable name="codes"
select="document(concat('http://localhost:8080/geonetwork/srv/en/xml.search.keywords?',$args))"/>
                        *
                                                <input class=&quot;md&quot; type=&lt;b>"hidden"* name="_{$ref}"
value="{gco:CharacterString/text()}" size="50" />

                                                <!!-- for codes combobox -->

                                                <select name="keyword-list" size="1"
onChange="document.mainForm._{$ref}.value=this.options[this.selectedIndex].text">
                                                        <option value=""/>
                                                        *<xsl:for-each select="$codes/response/descKeys/keyword">
                                        *
                                                                <xsl:variable name="entry" select="value/text()"/>
                                                                <option value="{$entry}">
                                                                        <xsl:if test="$entry=$keyword">
                                                                                <xsl:attribute name="selected"/>
                                                                        </xsl:if>
                                                                        <xsl:value-of select="$entry"/>
                                                                </option>

                                                        </xsl:for-each>
                                                </select>
                                        *</xsl:when>
                                        <xsl:otherwise>
                                                <input class="md" type="text" name="_{$ref}"
value="{gco:CharacterString/text()}" size="50" />
                                        </xsl:otherwise>
                                </xsl:choose>*
                                </xsl:variable>
                                <xsl:apply-templates mode="simpleElement" select=".">
                                        <xsl:with-param name="schema" select="$schema"/>
                                        <xsl:with-param name="edit" select="true()"/>
                                        <xsl:with-param name="text" select="$text"/>

                                </xsl:apply-templates>

                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:apply-templates mode="simpleElement" select=".">
                                        <xsl:with-param name="schema" select="$schema"/>
                                        <xsl:with-param name="edit" select="$edit"/>
                                        <xsl:with-param name="text">
                                                <xsl:value-of select="gco:CharacterString"/>
                                        </xsl:with-param>
                                </xsl:apply-templates>
                        </xsl:otherwise>
                </xsl:choose>
/

Cheers,
Byron Cochrane
LISAsoft

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7061559.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Simon,

I have taken a look at your ISO 19135 proposal and I think that it would be
a good improvement. In my own efforts, I have run into a couple of stumbling
blocks that will likely put my efforts on hold for awhile - at least until I
see what comes from other work such as yours and Francois'.

As you well noticed, the issues I face are the following. First a reliable
place to find the referenced thesaurus is an issue. I was thinking I solved
this by using the xlink value. This got me the thesaurs name I needed, but
because it was xlinked, I could not update the values. However, I think I
may be close to a solution. I know from editing the xml directly, that if I
update both the xlink value and the keyword value, my changes will be saved.
I have now progressed as far as extract the proper uri values I need (using
xml.search.keywords) but I have not been able to find a way to access the
the discriptiveKeywords xlink in a manner by which I can replace the value.
I only seem to be able to access this node to edit it if I am in xml edit
mode. The metadata.update function does not seem to provide an edit access
to this node except in xml mode. If I could find a solution to this I would
be near to having the interface I need.

Another issue with the approach that I am taking is that it will make it
difficult for these keywords to hold placehoder values as I want them to do
in templates. This is because they will be linked to values in the
xlink:href attribute. So what I have done is copied the rdf file as a local
thesaurus and added a "Select Value" entry. Unfortunately, this will make
updating this list to the latest value more difficult.

I have begun to explore your iso191355 support and I have a couple of
questions. What is the relation of iso19135 to rdf and skos? Can rdf files
be imported into iso19135? And if so, how is this done? Once I have my
iso19135 metadata record entered, how will I link that to my keywords and
other controlled vocabularies?

I would especially like to here any ideas about how I can access the
gmd:descriptiveKeywords xlink:href element in my code.

Cheers,
Byron Cochrane
LISAsoft

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Thesauri-and-keywords-in-template-records-tp7041495p7065663.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

On 12/06/2011 04:43 PM, ByronCinNZ wrote:

<snip>

I have begun to explore your iso191355 support and I have a couple of
questions. What is the relation of iso19135 to rdf and skos? Can rdf files
be imported into iso19135? And if so, how is this done? Once I have my
iso19135 metadata record entered, how will I link that to my keywords and
other controlled vocabularies?

The overall idea behind the ISO19135 proposal is to get codelists, vocabs and thesauri ('registers' would be the generic term for all these) handled in the same way by GeoNetwork. The ISO19135 record would be the point of truth from which the working formats of CT_CodelistCatalog & GN codelist files for the GeoNetwork editor and SKOS files for the thesaurus manager would be generated on the fly (or at least at predefined intervals). This seems to me to make sense as ISO19135 has the places that can be used to track changes to the register items and as a metadata record it can use some of the existing workflow helpers already in GeoNetwork (eg. groups and users with privileges etc) and can be harvested between sites etc. My only concern with ISO19135 was capturing the semantic relations between register items which would be required to accept and then reproduce SKOS vocabs but it seems these can be captured in the similarity elements for the register item so that seems to be ok.

So the next stages to make this happen are:

- add a SKOS to ISO19135 XSLT (in addition to the one already provided for CT_CodelistCatalogs) so existing registers in these formats can be ingested
- provide services that apply an XSLT to the base ISO19135 records to transform them into working formats (SKOS, CT_CodelistCatalog and GeoNetwork codelist XML files)
- get the existing GeoNetwork tools that use the working formats to accept inputs from the services that transform ISO19135 (in addition to their existing input sources)
- thesaurus source to be captured in the appropriate place in the gmd:descriptiveKeywords/*/gmd:thesaurusName citation subelements as described in a previous email

I need this for an internal project so I'll be working on this shortly - maybe we can fold in your approach with the last dot point above and produce a fix for ticket #711 as well.

Cheers,
Simon