I'm working on a TEI to HTML conversion using the TEI Stylesheets. The recommended method for doing this (I'm told) is to issue $ /path/to/Stylesheets/bin/teitohtml /path/to/INPUT.xml But I do not know how to specify parameters using this mechanism, or if I even can do so. It ends up issuing $ ant -q -Djava.awt.headless=true -f /path/to/Stylesheets/html/build-to.xml -lib /path/to/Stylesheets/lib/saxon9he.jar -Dodd=false -Dsaxon.jar=/path/to/Stylesheets/lib/saxon9he.jar -Dtrang.jar=/path/to/Stylesheets/lib/trang.jar -Dverbose=false -DinputFile=/tmp/INPUT.xml -DoutputFile=/tmp/INPUT.xml.html -Dprofiledir=/path/to/Stylesheets/profiles -Dprofile=default -Dpublisher= -Duid= -DselectedSchema= -Dlang=en -Dsubject= -Dcoverimage= -Doxygenlib=/usr/share/oxygen/lib And the ant build file Stylesheets/html/build-to.xml defines a teitohtml macro that uses (I think) Stylesheets/profiles/tei/ html/to.xsl. So It looks to me like I would have to add <param> elements to common/teianttasks.xml within the definition of the "buildhtml" macro. That doesn't strike me as nearly as user friendly as just specifying 'em on the `saxon` commandline: $ cd /path/to/Stylesheets/ $ saxon -xsl:profiles/tei/html/to.xsl -s:/path/to/INPUT.xml showTitleAuthor=true > /path/to/OUTPUT.html At least, I think that's the right way to do so (setting 1 para, "showTitleAuthor"). I can, of course, do this in oXygen, but the reason I wanted to do it on the commandline was to test a bug I was getting in oXygen. (Ticket https://github.com/TEIC/Stylesheets/issues/293.)
Syd, I am wondering as well how to add parameters to the transformation via `bin/transformtei`. I see that there are some extra flags for the teitoepub transformation, so maybe we need to add those for HTML as well? But this seems tedious and error prone and it would be better if all parameters (added on the cl) where just propagated and turned into ANT parameters somehow. Re #293 I just left a comment at the ticket. Best Peter
Am 05.11.2017 um 17:29 schrieb Syd Bauman
: I'm working on a TEI to HTML conversion using the TEI Stylesheets. The recommended method for doing this (I'm told) is to issue $ /path/to/Stylesheets/bin/teitohtml /path/to/INPUT.xml But I do not know how to specify parameters using this mechanism, or if I even can do so.
It ends up issuing $ ant -q -Djava.awt.headless=true -f /path/to/Stylesheets/html/build-to.xml -lib /path/to/Stylesheets/lib/saxon9he.jar -Dodd=false -Dsaxon.jar=/path/to/Stylesheets/lib/saxon9he.jar -Dtrang.jar=/path/to/Stylesheets/lib/trang.jar -Dverbose=false -DinputFile=/tmp/INPUT.xml -DoutputFile=/tmp/INPUT.xml.html -Dprofiledir=/path/to/Stylesheets/profiles -Dprofile=default -Dpublisher= -Duid= -DselectedSchema= -Dlang=en -Dsubject= -Dcoverimage= -Doxygenlib=/usr/share/oxygen/lib
And the ant build file Stylesheets/html/build-to.xml defines a teitohtml macro that uses (I think) Stylesheets/profiles/tei/ html/to.xsl. So It looks to me like I would have to add <param> elements to common/teianttasks.xml within the definition of the "buildhtml" macro. That doesn't strike me as nearly as user friendly as just specifying 'em on the `saxon` commandline: $ cd /path/to/Stylesheets/ $ saxon -xsl:profiles/tei/html/to.xsl -s:/path/to/INPUT.xml showTitleAuthor=true > /path/to/OUTPUT.html At least, I think that's the right way to do so (setting 1 para, "showTitleAuthor").
I can, of course, do this in oXygen, but the reason I wanted to do it on the commandline was to test a bug I was getting in oXygen. (Ticket https://github.com/TEIC/Stylesheets/issues/293.) -- tei-council mailing list tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived
participants (2)
-
Peter Stadler
-
Syd Bauman