Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforming the .odd #59

Open
flamminger opened this issue Apr 27, 2023 · 5 comments
Open

Transforming the .odd #59

flamminger opened this issue Apr 27, 2023 · 5 comments

Comments

@flamminger
Copy link

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
    image

  • the .xsd export returns a not readable file
    image
    However, exporting to .rng works

Oxygen

Converting with Oxygen.

  • to .xsd returns a not valid schema
    image
  • to .rnc and .rng works

TEIgarage

Converting with TEIgarage

  • to .xsd returns two files (document.xsd, xml.xsd)
  • to .rnc works
  • to .rng works

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?

@GVogeler
Copy link
Owner

The TEIgarage conversion to xsd is correct as the schema includes attributes from the xml-namespace.

@flamminger
Copy link
Author

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.

@AlinaOs
Copy link

AlinaOs commented Jun 28, 2023

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

@flamminger
Copy link
Author

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.

@AlinaOs
Copy link

AlinaOs commented Jun 28, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants