On Tue, 17 Jan 2023 06:57:23 +0100 Brar Piening <b...@gmx.de> wrote: > On 17.01.2023 at 02:05, Karl O. Pinc wrote: > > Or maybe the right way is to set a mode at the very top, > > the first apply-templates call, and not mess with the > > built-in templates at all. (You'd write your own > > "postgres-mode" templates the same way, to "wrap" > > and call the default templates.) > > > > Think of the mode as an implicit argument that's preserved and > > passed down through each template invocation without having to > > be explicitly specified by the calling code. > > I think the document you're missing is [1]. > > There are multiple ways to customize DocBook XSL output and it sounds > like you want me to write a customization layer which I didn't do > because there is precedent that the typical "way to do it" (TM) in the > PostgreSQL project is [2]. > > Regards, > > Brar > > [1] http://www.sagehill.net/docbookxsl/CustomizingPart.html > [2] http://www.sagehill.net/docbookxsl/ReplaceTemplate.html >
Sagehill is normally vary good. But in this case [2] does not apply. Or rather it applies but it is overkill because you do not want to replace what a template is producing. You want to add to what a template is producing. So you want to wrap the template, with your new code adding output before/ after what the original produces. [1] does not contain this technique. If you're not willing to try I am willing to see if I can produce an example to work from. My XSLT is starting to come back. Regards, Karl <k...@karlpinc.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein