kelvinn/capparselib

Allow to use official CAP XSD instead of extended ones

Opened this issue · 0 comments

Currently the parser is using extended version of the official CAP XSD.

This allows to more closely follow to (written) spec for some elements but this also means that some CAP XSDs that will check valid against the official XSDs won't be able to get parsed by this library.

To put that in perspective: Here is a CAP1.2 alert emitted by the Chinese weather service that would be valid using the official XSD but that this parser doesn't support:

https://cvzxdcwxid.execute-api.us-west-2.amazonaws.com/swic/url/cn-cma-xx/2021/07/25/19/43/2021-07-25-19-43-05-319-8e30f.xml

Would suggest to add something like a "use_extended_xsd_check" parameter to the parser that would allow to either use the official or the extended XSDs.