Closed jmccrae closed 3 months ago
Related to #93.
Hello. The schemas seem to be fine. It is the documents being validated which cause errors. I have made changes in the shared Colab to fix the errors encountered:
Error #1: lexicographicResource
is not an element of the schema was caused by the top element not being in the correct namespace. I changed it by adding xmlns="http://docs.oasis-open.org/lexidma/ns/dmlex-1.0"
to it. I am not sure if this is the proper and only possible way, but it works. After fixing that and recompiling, I got:
Error #2: Unexpected child with tag title
This is because you have used an outdated example XML file in which title
is still an element and not an attribute. This has been fixed in commit 88937b3b0cd0dde443e14d8ef3c0211ffc937c5d After changing the XML file, I got:
Error #3: The content of element lexicographicResource
is not complete. Tag translationLanguage
expected. This is expected behavior, because the XSD schema you have used is the one which implements all modules, including crossLingual. Because the XML file does not actually have any cross-lingual data, validation fails (because at least one translationLanguage
is required for cross-lingual data). If you replace the current XSD schema with the dmlex_no-crosslingual.xsd
, the document should validate (I have not done that in the Colab).
Okay I see
xmllint
does not support XSD 1.1, which is why we have errors using this tool.We are working towards integrating this into the CI #120, so it will be more visible then what needs to be done in order to validate the examples. We can review this afterwards.
I tried to use the XSD schemas (with
xmllint
) and get the following errorsRunning with the Python
xmlschema
library creates similar issues (see reproduction here: https://colab.research.google.com/drive/1EDLou3j5BgbFOCMhIpEv6KQIwJCGlUUX?usp=sharing)The definitions of XSD here seems to agree with
xmllint
Do we need to rollback #113?