Open flamminger opened 1 year ago
The TEIgarage conversion to xsd is correct as the schema includes attributes from the xml-namespace.
The TEIgarage conversion to xsd is correct as the schema includes attributes from the xml-namespace.
As far as I know, the output of the two files is normal (base definition + extension). However, I cannot use the .xsd output to validate any XML files.
@flamminger
However, I cannot use the .xsd output to validate any XML files.
If the question/problem still persists: I'm able to validate TEI-XML-documents when specifying the XSD in this way:
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 path/to/document.xsd">
path/to/document.xsd
needs to be the path/URL to the document.xsd (or the new filename, if it was renamed) and if the XSD is stored locally, the path should be relative to the XML document that is to be validated with the XSD.
It is important though to save the xml.xsd in the same directory as the document.xsd, otherwise all xml-prefixed attributes will be seen as invalid. Of course, both the document.xsd and the xml.xsd need to be unzipped first after downloading it from TEIgarage.
Thanks for the answer! I included the schema the same way. Can you validate the document.xsd and the xml.xsd? So far, only .odd to relax has produced valid and usable schemas.
Oh, excuse me, I didn't realise you meant the validation of the schema itself. Actually no, I encounter the same problem in Oxygen after using TEIgarage: violation against "Unique Particle Attribution". Oxygen is still able to validate my XML documents against the schema, but always shows this error message.
In fact I wanted to write an issue about that myself, but since it seems to relate to the same problem as your issue, I will just join this issue in saying, that I have the same problem. In particular, the legalActor
element seems to be problematic, as Oxygen blames it in nearly all cases. In my XSD, there are 58 UPA errors, so it is not a minor problem, if some processors refuse to validate against the schema.
I tried some simple things (e.g., changing the minOccurs
of the alternate
in the legalActor
's elementSpec
; specifying minOccurs
and maxOccurs
in the children of the alternate
element instead of the alternate
element itself; commenting the macro.specialPara
out) to see, what causes the problem, but the error persisted. I'm not very familiar with the ODD syntax though, so these tests were quite naive.
Maybe the contributors could look into this, especially since the TEI probably wouldn't accept changes that aren't valid? I'd certainly be very grateful!
We encountered a few issues when trying to convert the .odd file.
ROMA
Converting the tei_cei.odd file with ROMA to .rnc and to .xsd is not possible:
the RNC export returns a not readable file
the .xsd export returns a not readable file However, exporting to .rng works
Oxygen
Converting with Oxygen.
TEIgarage
Converting with TEIgarage
Is there a reason why the conversion process varies from tool to tool? Is there or will there be a working .xsd version of the schema?