TEIC / TEIGarage

EGE RESTful web service. Provides EGE functionality through RESTful web service way.
https://teigarage.tei-c.org
GNU General Public License v3.0
13 stars 1 forks source link

Add property to set defaultSource parameter in ODDC conversion #90

Open raffazizzi opened 2 months ago

raffazizzi commented 2 months ago

As reported by @bwbohl at https://github.com/TEIC/romajs/issues/152, converting ODD to compiled ODD (ODDC) results in a value for @source on <schemSpec> that's not very useful: /usr/share/xml/tei/odd/p5subset.xml. Here is an example from compiling a French version of the ODD Bare customization.

<schemaSpec xmlns:teix="http://www.tei-c.org/ns/Examples" 
    ident="tei_bare" xml:lang="fr" prefix="tei_" targetLang="fr"
    docLang="fr" defaultExceptions="http://www.tei-c.org/ns/1.0 teix:egXML"
    source="/usr/share/xml/tei/odd/p5subset.xml">

The XSLT that drives this transformation is odd2odd.xsl and it takes a $defaultSource parameter to set the @source attribute above.

I would suggest at least making sure that $defaultSource is set to the p5subset.xml at the public vault.tei-c.org URL corresponding to the one used during the transformation (which should be the latest TEI release that TEIGarage is pinned to).

Better yet, but perhaps more complex: Would it be possible to create a new property for the ODDC conversion so that users can set their preferred source? This may also help with supporting non-TEI customization ODDs.

peterstadler commented 1 month ago

off the top of my head the value of @source in the ODDC here is the result of the "worked out source" (there is some function like workoutsource) by the TEI Stylesheets. So this serves more or less a documentary purpose. I agree that the value here is not very helpful but I'm not sure whether it's on TEIGarage to change something?

Adding a property to set defaultSource parameter in ODDC conversion is indeed a feature request which would (automatically) result in an updated @source attribute.

So I think this is actually tow issues:

  1. Add a property to set defaultSource parameter
  2. overwrite the default Stylesheets output for @source if it's the current TEI P5 version

To repeat myself: +1 for item 1 but I'm unsure about 2

raffazizzi commented 1 month ago

I agree, option 2 seems perhaps a little hacky! Happy to limit this issue request to your point 1.