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

Reuse of schema generation? #11

Open
gerritbruening opened this issue Dec 13, 2022 · 5 comments
Open

Reuse of schema generation? #11

gerritbruening opened this issue Dec 13, 2022 · 5 comments
Assignees

Comments

@gerritbruening
Copy link
Contributor

@thvitt, do you think that a reuse of the mechanism that builds the schema is recommendable for nwa?
And would it be possible to directly integrate selected stuff from https://github.com/faustedition/faust-schema/blob/master/src/main/odd/faust-tei.xml, but not all of it?

@thvitt
Copy link
Member

thvitt commented Dec 15, 2022

The schema build process for the ODD file is a pretty straightforward application of the TEI consortiums official stylesheets for processing ODD files, and this I would recommend. However, both the process and the ODD files should be checked for recent developments in TEI. Specifically I believe the direct use of Relax NG in the ODD file is no longer recommended, IIRC ODD has now its own mechanisms or specifying the typical grammar constraints.

I could think of two ways to reuse ODD stuff from faust:

a) create a new odd and copy the relevant specifications over.
b) use odd chaining with the faust odd in the chain (i.e. specify the faust odd as a source in the nwa odd).

I would recommend a) since I would not expect many future changes to the Faust schema and it makes work much more flexible (e.g., updating to the newest TEI specification as a basis).

@gerritbruening
Copy link
Contributor Author

gerritbruening commented Dec 15, 2022

OK, thanks, I will copy and edit https://github.com/faustedition/faust-schema/blob/master/src/main/odd/faust-tei.xml.

However:

  • The file's content is not valid in my editor.
  • I am not sure I fully understand the schemaSpec section; what is prefix="tei_" and start="TEI" about? And can I point to the current version instead of vault?

@thvitt
Copy link
Member

thvitt commented Dec 15, 2022

  • start is the possible root element(s) of the documents that validate against that schema
  • prefix is a string that will be used in generated schemas for names created by the schema conversion process. Just leave it as is unless you have manually written schema parts and get into name conflicts.
  • You can of course link to a different TEI version, but I would recommend to always link to a specific version in order to keep the schema reproducable
  • The validation issues are probably due to changes in TEI since the schema has been written → needs to be investigated.

You’ll probably need to read chapters 22 and 23 of the TEI Guidelines to understand and work with the schema; I remember I needed both some time and some trial and error to understand this.

@gerritbruening
Copy link
Contributor Author

gerritbruening commented Dec 19, 2022

OK, I have begun reading ch. 22. I have copied faust-tei.xml to https://github.com/KlassikStiftungWeimar/nwa/blob/master/nwa-xml/schema/nwa-tei.xml, have made it valid and dropped unused stuff. Now I guess I have to adapt faust-schema.xpr accordingly, right?

@gerritbruening
Copy link
Contributor Author

BTW I could not clone faust-schema which seems to be due to the fact that data somehow has no master.

thvitt added a commit that referenced this issue Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants