Open streino opened 2 days ago
Possible fix: https://github.com/SEMICeu/iso-19139-to-dcat-ap/pull/48 Unless it is preferable to stick to version 1.0 for tooling compatibility?
Ping @fxprunayre. You may have insights on this as #42 contributor?
Unless it is preferable to stick to version 1.0 for tooling compatibility?
I don't know if there is any particular version to stick on.
FORG0001 Cannot convert string "RGF93 / Lambert-93 (EPSG:2154)" to double
Using check like $code castable as xs:double
is probably an option.
Thanks for feedback @fxprunayre. Let's see what the maintainers say about version requirements.
The castable
check would work too, and I believe you could remove $code = number($code)
in the example you provide, since both tests check the same thing. I can update my PR if that solution is preferred.
XSLT 2.0 is from 2007, so I think it is OK to require it. @uvoges can you see any problem of implementing XSLT 2.0 in data.europa.eu?
https://github.com/SEMICeu/iso-19139-to-dcat-ap/pull/42 bumped the XSLT version to 2.0 to use a new XPath feature.
lxml
(4.9.3) now fails to runiso-19139-to-dcat-ap.xsl
, as it only supports XSLT and XPath 1.0:Switching to
saxonche
(12.4.2), I get an error on some records (example):Coming from the following test:
This worked in XPath 1.0 but not in 2.0. Since 2.0 the type system fails when comparing incompatible types. Cf https://stackoverflow.com/questions/3854345/xpath-test-if-node-value-is-number.
Test code used to run the XSL: https://github.com/ecolabdata/ecospheres-scripts/blob/main/metadata/xsl-apply.py