projectLEMDO / lemdoIssues

Repository for LEMDO issue tracking and related documents.
MIT License
1 stars 0 forks source link

Schema build process depends on TEI site being available #45

Open martindholmes opened 2 years ago

martindholmes commented 2 years ago

The Schema build process is written in such a way that it depends on retrieving p5subset.xml from the TEI site, at the odd2odd.xsl stage. It looks like a fallback should be used, but I think there is also a bug in the way the odd2odd.xsl stylesheet determines where its source should come from, so supplying a local source doesn't seem to work properly, at least using the DEFAULTSOURCE parameter (and it's not clear to me whether that parameter should be camel-case or all-upper-case). In any case, since the TEI site is getting very unreliable lately, we MUST make it a priority to remove this dependency as soon as possible. We should stash a local copy of p5subset.xml in the repo and use that. We should also consider removing the dependency on GitHub for the stylesheets themselves, since that's not particularly reliable. I think we should probably have a target which attempts to download (using Ant get) all the resources needed, but with @usetimestamp to avoid pointless downloads, and not remove the local copies, so that if the get operation fails, there are still local copies available unless the process has never been run before on the machine.

martindholmes commented 2 years ago

This is a little more complicated than it seems; the fallback for the defaultTEIServer is our teijenkins server, which should solve the problem, but it does seem to fail when the TEI server is down. There is a collection of conditionals that make it quite tricky to trace what's happening. It tries to use the local Oxygen plugin version of p5subset.xml and the stylesheets, which is probably the best option.

martindholmes commented 1 year ago

This really is quite messy and needs to be rewritten. This should be the plan, I think:

  1. Stash a p5subset.xml in the repo's data/sch/ folder and use that. Updated it periodically when required. Have a target which can do that mechanically, although it could also be done manually of course.
  2. Have a target which downloads and unwraps the latest release of the Stylesheets to a fixed location in the repo path (but these should not be committed to the repo).
  3. At the beginning of the build process, check for the presence of the stylesheets, and if not there, invoke the download. Otherwise work with what is there. This enables us to work with dev versions of stylesheets if we need to (and ditto with p5subset.xml).
  4. Don't have any other fallback. Eliminate params pointing to Oxygen extension locations etc. If a programmer has no copy of the stylesheets and no internet access, they can manually copy them over from the Oxygen plugin anyway.
    1. Document thoroughly, along with explanations of how to update the p5subset.xml and the local stylesheet copies.
martindholmes commented 3 months ago

At rev 18491 I've implemented code to check for a local copy of the Stylesheets, and if there isn't one, to go and get one, and then a p5subset.xml to go with it. Next is to substitute this copy for the online copy wherever used.

martindholmes commented 3 months ago

First complete implementation in rev 18494. Let's see what happens on Mr Jinks.

martindholmes commented 3 months ago

I believe this is now working, so I'll close the ticket, but if a future outage of the TEI site causes any problems, we can reopen and investigate. There could be some obscure dependency still lurking somewhere.

martindholmes commented 2 months ago

Reopening this because we apparently still have a dependence on a remote copy of p5subset.xml. We should have a local copy along with our ODD file.

martindholmes commented 2 months ago

In rev 19426, I think I've eliminated the final dependence on the TEI server, by using the local copy of p5subset.xml in the documentation build process.