Allow bibliography path and link URL to be configured#23
Conversation
|
Sorry - it was me who added these hardcoded paths, thank you for cleaning up my mess! At the time I thought that adding the note I haven't tested it properly yet, but something that I noticed: shouldn't we add the new parameter(s) to I am afraid that some more adjustments will be needed, since similar hardcoded paths occurr also in |
e8aec27 to
bd296ee
Compare
|
Those comments were a perfectly pragmatic approach, most projects adapt the stylesheets anyway. In my case I'm trying to minimise the need for projects I'm working with to edit the stylesheets directly to keep things better maintainable, and I thought others might benefit from this approach too. So thank you for being open to it! Thanks for pointing out the need to adjust other hardcoded paths. In the latest commit I've replaced all hardcoded authority file references with the parametrised approach (hope I've cought them all) by introducing these additional params:
(I thought it would make sense to adapt the InsLib specific files too for consistency.) I've added One thing I wasn't sure about is the naming of the parameters: For bibliography I used the existing Happy to adjust anything based on your feedback! |
bd296ee to
82739ee
Compare
Currently, the
t:ptr[@target]template inhtm-teibibl.xslhardcodes two EFES specific values:webapps/ROOT/content/xml/authority/bibliography.xmlrelative tosystem-property('user.dir')provided by the Java runtime through EFES/Cocoon../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:
htm-teibibltemplate now uses$localbiblto construct the path to the bibliography fileglobal-varsandparams.xml,$localbiblis set to the currently hardcoded default path via the new$default-biblocvariable, ensuring full backwards compatibility without breaking existing projects$bib-link-templateparam can be used to provide an URL template where$1is replaced by the bibliography entry ID. Defaults to current pattern../concordance/bibliography/$1.htmlfor backwards compatibility.It would be great if this could be considered for merging as one step to make the stylesheets more independent from EFES.