ckanext-spatial icon indicating copy to clipboard operation
ckanext-spatial copied to clipboard

UomSymbol regex pattern rejects good values

Open FuhuXia opened this issue 10 years ago • 3 comments

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 avatar Oct 07 '14 19:10 FuhuXia

@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?

amilan17 avatar Oct 16 '14 20:10 amilan17

@FuhuXia can you point me to an ISO doc where this is failing? thanks

amercader avatar Apr 17 '15 13:04 amercader

@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.

FuhuXia avatar Apr 17 '15 15:04 FuhuXia