usaybia / usaybia-data

Data for interreligious interaction in Near Eastern texts
MIT License
2 stars 2 forks source link

Customize SPEAR schema #32

Open nathangibson opened 4 years ago

nathangibson commented 4 years ago

Have created a branch here that we can use for our customizations and discussions: https://github.com/srophe/srophe-eXist-app/tree/spear-customization-nathangibson-2020-04-21/documentation/SPEARschema

@lunadine After doing some more exploring my suggestion for Arabic tagging (tagging in the edition) would be to use (Visual Studio Code)[https://code.visualstudio.com/] with the (XML extension from RedHat)[https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml] which you can install from the sidebar. But for it to work you need to have the following attributes on your top-level TEI element:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://tei-c.org/release/xml/tei/custom/schema/xsd/tei_all.xsd"

It only validates against XSD schemas, not RNG/RNC like Oxygen. Because of that it seems to be less accurate with its suggestions/validations than Oxygen is. (And by the way Oxygen will consider the above attributes to be an error!)

For the factoid file (in data/factoids/tei) since it will be in English I would recommend you still use Oxygen because of the better validation/suggestions. To use our customized schema you'll need to include these lines at the top of the file:

<?xml-model href="https://raw.githubusercontent.com/srophe/srophe-eXist-app/spear-customization-nathangibson-2020-04-21/documentation/SPEARschema/out/SPEAR.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://raw.githubusercontent.com/srophe/srophe-eXist-app/spear-customization-nathangibson-2020-04-21/documentation/SPEARschema/out/SPEAR.rng" type="application/xml"
    schematypens="http://purl.oclc.org/dsdl/schematron"?>
nathangibson commented 4 years ago

Confirmed with @dlschwartz that we want to continue to use a branch to customize the SPEAR ODD, currently https://github.com/srophe/srophe-eXist-app/tree/spear-customization-nathangibson-2020-07-31/documentation/SPEARschema (our links need to be updated). Later @dlschwartz plans to set up multiple chained ODDs, the top level of which is non-project-specific.

nathangibson commented 4 years ago

Will need to also set up index files for validation similar to https://github.com/srophe/srophe-app-data/blob/master/data/subjects/taxonomyIndex.xml

There is an XSLT somewhere that does this.

dlschwartz commented 4 years ago

@nathangibson it needs some work due to discussions we had today but you can find the latest version here: https://github.com/srophe/srophe-app-data/blob/master/data/subjects/taxonomyIndex.xsl.

nathangibson commented 4 years ago

@dlschwartz Thanks!

nathangibson commented 4 years ago

@lunadine At the top of your factoid files, in the 2 places where it says <?xml-model href="..." you can insert https://raw.githubusercontent.com/srophe/srophe-eXist-app/usaybia-schema-customization/documentation/SPEARschema/out/SPEAR.rng instead of the link that is there right now. That will update the validation.