ckanext-spatial
ckanext-spatial copied to clipboard
UomSymbol regex pattern rejects good values
Here, the UomSymbol validation regex pattern [^: \n\r\t]+
in theory is supposed to reject all chars of colon, space, newline, carriage return, and tab. But we found out it actually rejects all n, r, t chars. Values such as decimalDegrees
and feet
will fail the validation.
If we rewrite the pattern to an equivalent [^:\s]+
, then all looks ok.
@FuhuXia - Thanks for this fix! However, I don't understand why the exacty same file works fine in my validation scenario, but not in CKAN. Do you know what validation engine is in use?
@FuhuXia can you point me to an ISO doc where this is failing? thanks
@amercader Sample ISO xml: https://www.dropbox.com/s/zle1tklq164g0yu/732.xml Harvest errors for this doc:
Element '{http://www.isotc211.org/2005/gco}Measure', attribute 'uom': 'feet' is not a valid value of the union type '{http://www.opengis.net/gml/3.2}UomIdentifier'. (line 108)
Element '{http://www.isotc211.org/2005/gco}Measure', attribute 'uom': 'aaadecimalesrnbe' is not a valid value of the union type '{http://www.opengis.net/gml/3.2}UomIdentifier'. (line 95)
feet
and aaadecimalesrnbe
fail because they contain n
, r
, t
chars.