[GeoNetwork-users] Adding multiple elements via CSW Transaction

Hi all,

I'm hoping to add multiple Topic Categories to ISO19139 records using CSW
update transactions.

I'm hitting the problem of rather than new category elements being created,
the existing one is simply updated. I realize this is the expected
behavior, but I'm trying to use square bracket notation in my XPATH to
indicate a non-existent element.

For example, with a record that has one topicCategory element, I'm trying
the following CSW Transaction request to add a second topicCategory.

<?xml version="1.0" encoding="UTF-8"?>
<csw:Transaction service="CSW" version="2.0.2"
                 xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
                 xmlns:ogc="http://www.opengis.net/ogc&quot;
                 xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0&quot;&gt;

    <csw:Update>

        <!-- XPath property -->
        <csw:RecordProperty>
                    <csw:Name>
*gmd:identificationInfo[1]/gmd:MD_DataIdentification[1]/gmd:topicCategory[2]/gmd:MD_TopicCategoryCode[1]*
</csw:Name>
            <csw:Value>health</csw:Value>
        </csw:RecordProperty>

     <csw:Constraint version="1.1.0">
         filter stuff...
        </csw:Constraint>
    </csw:Update>
</csw:Transaction>

Is this even a possible approach? It seems the square bracket values aren't
being recognized, and instead once GN sees any topicCategory element, it
stops and uses that one, hence replacing rather than adding a second one.
Should I instead manipulate the entire XML document myself and then replace
the entire XML document via CSW?

This also comes up with regards to keywords.

Thanks for any help!

--
Kevin Dyke
Spatial Data Analyst/Curator
John R. Borchert Map Library, University of Minnesota Libraries
Office: 612.301.3932
Email: dykex005@anonymised.com
Web: kevinrdyke.com