[GeoNetwork-users] CSW GetRecords : Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*',

Dear Geonetwork community,

I face a problem trying to harvest a GeoNetwork catalog through a CSW GetRecords.

I use OWSLIB which works with POST requests to get records.

This can be reproduced using the CSW endpoint of a GN catalog and this payload :

<csw:GetRecords
  xmlns:csw=http://www.opengis.net/cat/csw/2.0.2
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
  xmlns:ows=http://www.opengis.net/ows
  outputSchema=http://www.isotc211.org/2005/gmd
  outputFormat="application/xml"
  version="2.0.2"
  service="CSW"
  resultType="results"
  maxRecords="10"
  xsi:schemaLocation=http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&lt;http://www.opengis.net/cat/csw/2.0.2%20http:/schemas\.opengis\.net/csw/2\.0\.2/CSW\-discovery\.xsd&gt;&gt;
  <csw:Query typeNames="csw:Record">
    <csw:ElementSetName>full</csw:ElementSetName>
  </csw:Query>
</csw:GetRecords>

It works most of the time. For example with http://vmamapgn-test.mpl.ird.fr/geonetwork/srv/eng/csw

However, on some GeoNetwork catalogs, I got the following error for each MD in the results list :
<!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->

This is the case with https://catalogue.atlasante.fr/geonetwork/srv/fre/csw?

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordsResponse xmlns:csw=http://www.opengis.net/cat/csw/2.0.2 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&lt;http://www.opengis.net/cat/csw/2.0.2%20http:/schemas\.opengis\.net/csw/2\.0\.2/CSW\-discovery\.xsd&gt;&gt;
    <csw:SearchStatus timestamp="2023-11-14T12:13:52" />
    <csw:SearchResults numberOfRecordsMatched="1133" numberOfRecordsReturned="10" elementSet="full" nextRecord="11">
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->
        <!--Invalid XPath expression: "/csw:Record//": Expected one of '.', '..', '@', '*', <QName>-->

    </csw:SearchResults>
</csw:GetRecordsResponse>

May it be a version or a configuration issue on this specific catalog ? What can I ask to the catalog maintainer to fix that ?

Thank you for any help you can provide.

Kind regards

Matthieu