Open HelenaSabel opened 2 years ago
There are 2 different mechanisms for a TEIC/TEI/P5/Exemplars/*.template file to record the “name” of the template:
@n
of the outermost element;There are 21 .template files. Twenty of them use (1); and only one (isofs.template) uses (2).
Does anyone know why the isofs template file uses a PI instead of @n
? (@lb42, @jamescummings, @laurentromary?)
My instinct is that the PI mechanism exists so that a template could exemplify the use of an @n
attribute on the outermost element. Even though none of them actually do that, it is a reasonable thing to do. So personally, I think they should all use a PI mechanism, and the code should not even look at the /*/@n
. I think a somewhat more descriptive PI than “name” would be a good plan, too. Perhaps “tei-template-name” or “tei-oxygen-name” or some such. Furthermore, said PI should either be a child of the document node (thus the code would search for /processing-instruction('tei-template-name')
) or anywhere in the document (thus the code would search for //processing-instruction('tei-template-name')
).
I have overhauled the system in branch "sydb_issue_2286". It seems to pass both make clean validate html-web test exemplars teiwebsiteguidelines pdf epub
and a separate make clean dist-exemplars
; the generated template files (.xml) look right to me (and the URLs for the schemas, probably the trickiest bit, resolve to the correct schema, too); and of course the generated .properties files no longer have an inappropriate XML declaration.
Can someone (@peterstadler, @martindholmes, or @raffazizzi) create a Jenkins job to test this, too? I have not issued a PR yet, kinda hoping someone else can verify I haven’t messed things up royally before I do.
What I have not done is to look to see if there is any documentation about how this system works, and update it.
I've added two jobs in my Jenkins "Temporary Jobs" view, one to build P5 from your branch, and one triggered by it to build the Oxygen plugin from the results of that branch. When all that's done in a couple of hours, we can somehow test the plugin; I think the simplest way to do that will just be to overwrite the contents of the plugin stuff in our Oxygen extensions folder with the products of that build.
@sydb I think there may be a problem here. I've now taken the templates folder output of the temporary Oxygen job and copied the templates folder over the top of my local Oxygen TEI plugin, and confirmed that the templates still work; the properties files no longer have the unwanted XML declaration. BUT the built plugin doesn't seem to have templates for ODD, and it doesn't have a properties file for the JTEI template. I've checked the latest build of the bleeding-edge plugin, and they're there in that case, so I think something has gone wrong.
I would suggest creating a new branch JUST for changing the output method and solving that problem first; then when that's OK, moving on to the other things that look wrong.
Can provide the ptr to the templates folder?
@sydb I emailed you.
Check, thanks. Will try to look at this more carefully soon.
@sydb @martindholmes Have we worked on this since last April's orientation/investigation of the plugin builds?
Not to my knowledge. The build is still set up on my Jenkins.
@sydb Can I remove the build job for this on my Jenkins?
Umm … dunno, but doubt it. Will try to take a look tonight (my time zone).
@sydb Any movement on this?
TEI/P5/Exemplar/make_template.xsl
generates a.properties
files with an XML declaration.