question about transformation scheme
Dear colleagues, I wish to read the text in the attached xml file with students in Paris this Thursday, and I need to be able to do so in an at least moderately reader-friendly manner. I have tried the TEI P5 XHTLM transformation scheme built into Oxygen and get the result also attached. I don’t understand why none of the @resp and @source values get picked up in the apparatus, why the value of @wit gets printed in bold only in note 8 (lemma samatā), and why note numbers are created in the text but not in the apparatus. It would also be nice if @type values on <lem> and <rdg> (‘em’ and ‘norm’) were displayed in the apparatus, but since these are user-specific I realize I won’t be able to use a prefabricated scheme for this. Would you be able to recommend (and/or share) a scheme that would do better at displaying this xml code, or that would do well as displaying it if I made some small modifications to the xml code? Unfortunately I am still xslt-illiterate, so unable to create a usable scheme of my own. Thanks for your help. Best wishes, Arlo Griffiths
On Mon, Oct 01 2018, Arlo Griffiths wrote:
Dear colleagues,
I wish to read the text in the attached xml file with students in Paris this Thursday, and I need to be able to do so in an at least moderately reader-friendly manner. I have tried the TEI P5 XHTLM transformation scheme built into Oxygen and get the result also attached. I don’t understand why none of the @resp and @source values get picked up in the apparatus, why the value of @wit gets printed in bold only in note 8 (lemma samatā),
Dear Arlo, this might be due to the fact that this is the only tei:lem with a wit attribute (all others have source attributes).
and why note numbers are created in the text but not in the apparatus. It would also be nice if @type values on <lem> and <rdg> (‘em’ and ‘norm’) were displayed in the apparatus, but since these are user-specific I realize I won’t be able to use a prefabricated scheme for this.
Would you be able to recommend (and/or share) a scheme that would do better at displaying this xml code, or that would do well as displaying it if I made some small modifications to the xml code?
As far as I know, Oxygen uses the standard TEI stylesheets (https://github.com/TEIC/Stylesheets). They’re HUGE, so it’s a bit difficult to adapt them to individual cases. I don’t use oxygen, so I don’t know if it has facilities for refactoring those stylesheets. We did that for SARIT, and I attach a PDF rendering (not sure if you need html for your reading class) that was generated by using the SARIT XML->LaTeX stylesheets. The XML->HTML is produced differently (inside eXistdb) with SARIT, so I can’t help you much there. To reproduce that you’d have to clone and apply the stylesheets, and then compile the LaTeX document (assuming you have the file in /tmp/kalpabuddha.xml), along the following lines (I refer to my github copy of the SARIT/TEI stylesheets, because I didn’t want to push things to the SARIT repository without testing): git clone https://github.com/paddymcall/Stylesheets.git cd Stylesheets saxonb-xslt -ext:on -xi -xsl:./profiles/sarit/latex/to.xsl -s:/tmp/kalpabuddha.xml -o:/tmp/kalpabuddha.tex cd /tmp xelatex kalpabuddha.tex (a few times) It does not compile without errors (fixes welcome!), but it does compile. I have no idea how that would work in Oxygen, though, or even on non-Linux computers. For what it’s worth, you can look at https://github.com/paddymcall/Stylesheets/commit/3458a39b9298193baf672b29a7c... to see what I had to add/change to suit your requirements. The transformation for HTML would probably work with similar modifications. Another avenue to explore besides this is CETEIcean (https://github.com/TEIC/CETEIcean). It uses Javascript, and I find it very useful for fast preview/edit/preview work on smaller documents. But the technical requirements are a bit tricky, so maybe Thursday is a bit too soon to experiment with this. Yet another option would be to use a hack: in https://github.com/paddymcall/Stylesheets.git, there is a translation profile, in ./profiles/sarit/org/tei-to-org.xsl, that transforms things into a markdown-like file. The resulting file can then be fed to pandoc (http://pandoc.org/) to get all kinds of output. For HTML, you could do: git clone https://github.com/paddymcall/Stylesheets.git cd Stylesheets saxonb-xslt -ext:on -xi -xsl:./profiles/sarit/org/tei-to-org.xsl -s:/tmp/kalpabuddha.xml -o:/tmp/kalpabuddha.org cd /tmp pandoc -f org /tmp/kalpabuddha.org --standalone --output /tmp/kalpabuddha.html This does not try to hide the app elements, but embeds them in a reasonable context. I attach the result from my local version. To play around with this, you’d have to look at/edit Stylesheets/profiles/sarit/org/tei-to-org.xsl. Best wishes, -- Patrick McAllister long-term email: pma@rdorte.org
Dear Arlo,
I am pleased to see how well the SARIT stylesheets worked. I attach
another, project-specific XSLT file, which you might play around with: it
has a lot of garbage that will surely be irrelevant to you (chāyās,
parallel texts, etc.), but it has some useful routines for eledmac,
including apparatus entries with @source, @resp, and @wit values.
Andrew
On Mon, Oct 1, 2018 at 2:52 PM Patrick McAllister
On Mon, Oct 01 2018, Arlo Griffiths wrote:
Dear colleagues,
I wish to read the text in the attached xml file with students in Paris this Thursday, and I need to be able to do so in an at least moderately reader-friendly manner. I have tried the TEI P5 XHTLM transformation scheme built into Oxygen and get the result also attached. I don’t understand why none of the @resp and @source values get picked up in the apparatus, why the value of @wit gets printed in bold only in note 8 (lemma samatā),
Dear Arlo,
this might be due to the fact that this is the only tei:lem with a wit attribute (all others have source attributes).
and why note numbers are created in the text but not in the apparatus. It would also be nice if @type values on <lem> and <rdg> (‘em’ and ‘norm’) were displayed in the apparatus, but since these are user-specific I realize I won’t be able to use a prefabricated scheme for this.
Would you be able to recommend (and/or share) a scheme that would do better at displaying this xml code, or that would do well as displaying it if I made some small modifications to the xml code?
As far as I know, Oxygen uses the standard TEI stylesheets (https://github.com/TEIC/Stylesheets). They’re HUGE, so it’s a bit difficult to adapt them to individual cases. I don’t use oxygen, so I don’t know if it has facilities for refactoring those stylesheets.
We did that for SARIT, and I attach a PDF rendering (not sure if you need html for your reading class) that was generated by using the SARIT XML->LaTeX stylesheets. The XML->HTML is produced differently (inside eXistdb) with SARIT, so I can’t help you much there.
To reproduce that you’d have to clone and apply the stylesheets, and then compile the LaTeX document (assuming you have the file in /tmp/kalpabuddha.xml), along the following lines (I refer to my github copy of the SARIT/TEI stylesheets, because I didn’t want to push things to the SARIT repository without testing):
git clone https://github.com/paddymcall/Stylesheets.git cd Stylesheets saxonb-xslt -ext:on -xi -xsl:./profiles/sarit/latex/to.xsl -s:/tmp/kalpabuddha.xml -o:/tmp/kalpabuddha.tex cd /tmp xelatex kalpabuddha.tex (a few times)
It does not compile without errors (fixes welcome!), but it does compile.
I have no idea how that would work in Oxygen, though, or even on non-Linux computers.
For what it’s worth, you can look at
https://github.com/paddymcall/Stylesheets/commit/3458a39b9298193baf672b29a7c... to see what I had to add/change to suit your requirements. The transformation for HTML would probably work with similar modifications.
Another avenue to explore besides this is CETEIcean (https://github.com/TEIC/CETEIcean). It uses Javascript, and I find it very useful for fast preview/edit/preview work on smaller documents. But the technical requirements are a bit tricky, so maybe Thursday is a bit too soon to experiment with this.
Yet another option would be to use a hack: in https://github.com/paddymcall/Stylesheets.git, there is a translation profile, in ./profiles/sarit/org/tei-to-org.xsl, that transforms things into a markdown-like file. The resulting file can then be fed to pandoc (http://pandoc.org/) to get all kinds of output.
For HTML, you could do:
git clone https://github.com/paddymcall/Stylesheets.git cd Stylesheets saxonb-xslt -ext:on -xi -xsl:./profiles/sarit/org/tei-to-org.xsl -s:/tmp/kalpabuddha.xml -o:/tmp/kalpabuddha.org cd /tmp pandoc -f org /tmp/kalpabuddha.org --standalone --output /tmp/kalpabuddha.html
This does not try to hide the app elements, but embeds them in a reasonable context. I attach the result from my local version. To play around with this, you’d have to look at/edit Stylesheets/profiles/sarit/org/tei-to-org.xsl.
Best wishes,
-- Patrick McAllister long-term email: pma@rdorte.org _______________________________________________ Indic-texts mailing list Indic-texts@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/indic-texts
participants (3)
-
Andrew Ollett
-
Arlo Griffiths
-
Patrick McAllister