biblia-arabica / mss-catalog-pilot

Workspace for exploring manuscript cataloguing solutions in TEI
1 stars 1 forks source link

Create simplified schema for msContents block #8

Closed nathangibson closed 2 years ago

nathangibson commented 3 years ago

@wsalesky I've started creating a constrained schema that should allow the basic stuff needed for msIdentifier and msContents (see #10 ). It still allows too many elements and attributes, but can you tell me if it's going in the right direction?

https://github.com/biblia-arabica/mss-catalog-pilot/blob/feature/constrained-schema-for-forms/schemas/mss-forms.odd

Also, does compiling an odd such as https://github.com/biblia-arabica/mss-catalog-pilot/blob/feature/constrained-schema-for-forms/schemas/mss-forms-compiled.odd using the odd2odd.xsl provided with TEI stylesheets allow you to not have to look at the parent ODD?

CC: @mMoliere

nathangibson commented 3 years ago

By the way, in order to chain odds, we have to start from a pre-compiled schema, but this could be auto-generated as needed. Thus my schemaSpec/@source is https://github.com/biblia-arabica/mss-catalog-pilot/blob/feature/constrained-schema-for-forms/schemas/mss-compiled.odd

mMoliere commented 3 years ago

@nathangibson I would rather that we cast a wider net – even as we limit ourselves to only msIdentifier and msContents. Consider the following additions:

nathangibson commented 3 years ago

Thanks @mMoliere I've updated it with your suggestions. We will certainly need more additions/subtractions (especially removing attributes). This is a work in progress to explore how radically reducing the schema affects the form generation and to start implementing the ODD chaining. But feel free to make more suggestions or to make edits yourself.

mMoliere commented 3 years ago

@nathangibson I added some more elements that seemed essential to me.

I noticed that the schema as of now contains elements used for critical text editing (add, del, unclear …). Do we intend to use them in this stage? If not they should be excised (at least until we begin work on the XForms blocks that require them).

nathangibson commented 3 years ago

@mMoliere No, let's get rid of them for now.

nathangibson commented 3 years ago

OK, I removed those also and merged the pull request, but feel free to keep modifying the branch and do another pull request as needed.

mMoliere commented 3 years ago

Will do!

nathangibson commented 3 years ago

To do: Align with the options we discussed on 21.7. for text contents module

mMoliere commented 3 years ago

We should sit together and discuss which attributes we want to excise from which elements. It's fairly easy to do that in Roma. But I want to be on the same page regarding how the msItems will connect to the various authority files etc. Is this something we should discuss before the meeting on Wednesday or do your prefer we schedule a date after the meeting?

nathangibson commented 3 years ago

@mMoliere I was thinking of @ref on title, author, etc. Did you have another idea?

Edit: Meaning @ref pointing to URIs for works, persons, etc.

mMoliere commented 3 years ago

@nathangibson I was thinking along the same lines. Good, then I'll put the axe to the other attributes.

mMoliere commented 3 years ago

@nathangibson So, I have made a pull request for this subset of the Schema. I hope that it will behave in the XForms the way we want it to.

nathangibson commented 3 years ago

@mMoliere Fantastic! Going through it right now.

nathangibson commented 3 years ago

@mMoliere Overall it looks like this worked really well and the attribute removal is pretty clean. However, a couple things remain:

Let me know if you have any questions.

mMoliere commented 3 years ago

@nathangibson It seems clear at the moment what is required. If I run into problems, I will get back to you.

mMoliere commented 3 years ago

@nathangibson I think the schema should now conform to what we discussed. Tell me if it needs further modifications.

nathangibson commented 3 years ago

@mMoliere Looks like it's all in order except msItem still needs @cert, @rend, @rendition, @style, and @xml:base removed.

mMoliere commented 3 years ago

@nathangibson Sorry, for that oversight. I'll take care of it.

nathangibson commented 3 years ago

@mMoliere I'm trying to generate the RNG and compiled ODD from the mss-forms.odd but Oxygen is giving me an error. I'm using the up-to-date version of the TEI add-on (15.0.0) but an outdated version of Oxygen (18.1).

Are you able to do the transforms or do you also get an error?

Edit: It's actually just the ODD to RNG that gives an error.

nathangibson commented 3 years ago

See also #15

mMoliere commented 3 years ago

@nathangibson My OxygenXML is version 22. I also have trouble compiling the RNG. Strangely, I wasn't able to compile RNGs from other ODDs as well.

nathangibson commented 3 years ago

@mMoliere I think something weird is going on in https://github.com/biblia-arabica/mss-catalog-pilot/pull/14/commits/ddd8012a19f2fb62ac0af3ad6cfba8cc5def1a1e .

mss-forms-compiled.rng is only 186 lines and doesn't have msDesc at all. How/from what was it compiled?

The RNG I compiled for a previous version is 2800+ lines. (I think it essentially contains the entire TEI grammar.)

I'm not particularly familiar with RNG syntax but this is rather mystifying to me.

Cf #14

mMoliere commented 3 years ago

@nathangibson Since the compiler did not display any errors, the ODD is valid. But the RNG with that length can't be right. I'm trying to understand what went wrong.

I compiled the RNG from the updated mss-forms.odd on OxygenXML Editor 22.

nathangibson commented 3 years ago

Hmm, we might need to get help from the TEI mailing list or file an issue.

Are you using the TEI Plugin for Oxygen? What version is the plugin? (Help > Check for add-ons updates)

mMoliere commented 3 years ago

I am using the newest version of the TEI Plugin (15.0.0)

nathangibson commented 3 years ago

Hmm. Years ago when I had a problem with the transformation I was able to run it in the command line using ANT. (You can see this happening when it attempts the transform in Oxygen.) I don't remember anymore how to do this. Do you want to try it and if it doesn't work maybe ask on the TEI list or post an issue at https://github.com/TEIC/oxygen-tei ?

nathangibson commented 3 years ago

Or else what do you think we should try?

PietroLiuzzo commented 3 years ago

I have compiled mss-forms.odd from the branch feature/constrained-schema... which is the latest updated, successfully, should I push it to that branch?

PietroLiuzzo commented 3 years ago

my result RNG is quite long, and complete. I am not sure if the input file was the correct one.

nathangibson commented 3 years ago

Yes, thank you @PietroLiuzzo that would be wonderful! That is the correct source file and branch. You can overwrite mss-forms.rng.

Not sure what's going on for Max and me with Oxygen transforms. Any ideas? Here's what happens for me:

Executing:
"/Applications/Oxygen XML Editor/.install4j/jre.bundle/Contents/Home/jre/bin/java" -Dapple.awt.UIElement=true -Xmx256m -classpath "/Applications/Oxygen XML Editor/tools/ant/lib/ant-launcher.jar" "-Dant.home=/Applications/Oxygen XML Editor/tools/ant" org.apache.tools.ant.launch.Launcher -lib "/Applications/Oxygen XML Editor/classes" -lib "/Applications/Oxygen XML Editor/lib/oxygenAuthor.jar" -lib "/Applications/Oxygen XML Editor/lib/oxygenDeveloper.jar" -lib "/Applications/Oxygen XML Editor/lib/oxygenEclipse.jar" -lib "/Applications/Oxygen XML Editor/lib/oxygenAuthorEclipse.jar" -lib "/Applications/Oxygen XML Editor/lib/oxygenDeveloperEclipse.jar" -lib "/Applications/Oxygen XML Editor/lib/resolver.jar" -lib "/Applications/Oxygen XML Editor/lib/xercesImpl.jar" -lib "/Applications/Oxygen XML Editor/lib/saxon9ee.jar" -lib "/Applications/Oxygen XML Editor/lib/saxon9-sql.jar" -lib "/Applications/Oxygen XML Editor/lib/saxon.jar" -lib "/Applications/Oxygen XML Editor/lib/xml-apis-ext.jar" -lib "/Applications/Oxygen XML Editor/lib/log4j.jar" -lib "/Applications/Oxygen XML Editor/lib/oxygen-basic-utilities.jar" -f "/Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/relaxng/build-to.xml" "-DinputFile=/Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/mss-forms.odd" "-DoutputFile=/Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/out/mss-forms.rng" "-Dprofile=default" "-Dlang=en" "-Doxygenlib=/Applications/Oxygen XML Editor/lib" "-DdefaultSource=file:/Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/odd/p5subset.xml" "-Dwebhelp.trial.license=no"

Buildfile: /Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/relaxng/build-to.xml

go:
     [echo] Do ODD expand processing (schema ${selectedSchema}) 
     [xslt] Processing /Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/mss-forms.odd to /Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/mss-forms.odd.processedodd
     [xslt] Loading stylesheet /Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/odds/odd2odd.xsl
     [echo] XSLT generate relaxng files
     [xslt] Processing /Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/mss-forms.odd.processedodd to /Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/out/mss-forms.rng
     [xslt] Loading stylesheet /Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/profiles/default/relaxng/to.xsl
     [xslt] /Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/odds/odd2relax.xsl:471:51: Fatal Error! Concatenation operator ('||') requires XPath 3.0 to be enabled
     [xslt] Failed to process /Users/blah/Github/biblia-arabica/mss-catalog-pilot/schemas/mss-forms.odd.processedodd

BUILD FAILED
/Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/relaxng/build-to.xml:30: The following error occurred while executing this line:
/Users/blah/Library/Preferences/com.oxygenxml/extensions/v18.1/frameworks/http___www.tei_c.org_release_oxygen_updateSite.oxygen/tei/xml/tei/stylesheet/common/teianttasks.xml:355: javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: Stylesheet compilation failed: 1 error reported
    at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:155)
...
PietroLiuzzo commented 3 years ago

its in the default out/ directory. let me know if that is what you where trying to achieve. I have no idea why it fails. I am running oxygen 20.1 (yeah... licence...) and using the dev version of the framework. but perhaps it has the same error as the one you are discussing and I simply failed to understand. I did not follow all the conversation.

nathangibson commented 3 years ago

No problem, yes, it looks right and I moved it to the schemas directory.

I'll do some checking around on the error when I get time.

mMoliere commented 3 years ago

Thank you @PietroLiuzzo !

nathangibson commented 2 years ago

@mMoliere You can close this when you're ready.