Ticket #304 (closed defect: fixed)
WFS Harvester XSLT bug
|Reported by:||JoshVote||Owned by:||Fxp|
My 2.4.2 / 2.4.3 geonetwork instance is failing to harvest the MD_Metadata/distributionInfo/MD_Distribution/ transferOptions/ MD_DigitalTransferOptions/onLine/CI_OnlineResource/linkage/URL from some of my WFS’s (all version 1.1.0).
I did a bit of digging and it looks like it’s because the root element of the ‘faulty’ WFS GetCapabilities response is defined with no prefix (See below).
Whereas the WFS’s that are being harvested correctly all specify the root element as
<wfs:WFS_Capabilities xmlns:wfs="http://www.opengis.net/wfs" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> ...
From what I can tell both are valid XML so I started to think it may be a bug with GN. Having a look at geonetwork/xsl/conversion/import/OGCWxSGetCapabilities-to-ISO19119_ISO19139.xsl there is a section that tests
test="name(.)='wfs:WFS_Capabilities' or name(.)='wps:Capabilities'"
Which is only testing the Prefix name, not the actual namespace URI that the prefix is representing. It should really read something like the following (I’m no XSLT expert so there may be a more succinct way of doing this...)
I’ve attached a patch of this change, I haven’t searched for any other instances of this issue...