Skip to content

Allow bibliography path and link URL to be configured#23

Open
olvidalo wants to merge 1 commit intoEpiDoc:masterfrom
olvidalo:fix/bibliography-path-param
Open

Allow bibliography path and link URL to be configured#23
olvidalo wants to merge 1 commit intoEpiDoc:masterfrom
olvidalo:fix/bibliography-path-param

Conversation

@olvidalo
Copy link
Contributor

Currently, the t:ptr[@target] template in htm-teibibl.xsl hardcodes two EFES specific values:

  • The path to the bibliography authority file (webapps/ROOT/content/xml/authority/bibliography.xml relative to system-property('user.dir') provided by the Java runtime through EFES/Cocoon
  • The bibliography item link URL pattern (../concordance/bibliography/{id}.html).

This makes it hard to use the stylesheets outside of EFES, or with different output site structures that don't follow EFES' patterns.

This PRs uses two configurable params following existing conventions to solve this:

  • The htm-teibibl template now uses $localbibl to construct the path to the bibliography file
  • In global-varsandparams.xml, $localbibl is set to the currently hardcoded default path via the new $default-bibloc variable, ensuring full backwards compatibility without breaking existing projects
  • The new $bib-link-template param can be used to provide an URL template where $1 is replaced by the bibliography entry ID. Defaults to current pattern ../concordance/bibliography/$1.html for backwards compatibility.

It would be great if this could be considered for merging as one step to make the stylesheets more independent from EFES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant