TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

How to add Author tag to the top when using html.xsl #530

Closed CJohnno77 closed 1 year ago

CJohnno77 commented 2 years ago

I am using html.xsl to convert TEI XML to HTML. What do I need to do to add the Author(s) to the top of the document just below the Title. I would like to add the Author(s) as an <h2> element below the <h1> Title.

I can see the Author(s) are found at /TEI/teiHeader/fileDesc/titleStmt/author in the XML. What parameter do I need to add to my to.xsl file?

sydb commented 2 years ago

Well, according to this documentation, there is a $showTitleAuthor parameter which defaults to false. We (@martindholmes and I) have figured out that if you have a …/front/titlePage/, this parameter (and most all the metadata) is ignored.

Note that there are instructions in that documentation for setting parameters via some not too old (I hope) version of oXygen. If you want to use Saxon on the commandline you could issue

java -jar saxon10he.jar -xsl:/path/to/TEIStylesheets/html/html.xsl -s:/path/to/input.xml -o:/path/to/output.html  showTitleAuthor=true

Note that, depending on your shell, you may have to provide absolute paths to the input & output.

Please let us know (here) whether this works for you or not. If we don’t hear from you by 2022-01-14 we will close the ticket.