On Mon, 16 Jan 2023 11:14:35 -0600 "Karl O. Pinc" <k...@karlpinc.com> wrote:
> On Sun, 15 Jan 2023 18:01:50 -0600 > "Karl O. Pinc" <k...@karlpinc.com> wrote: > > > Regards XSLT: > > > > I believe the XSLT needs work. > In XSLT 1.0 there is no xml:default-mode. So I _think_ what you do > then is modify the built-in template rules so that the (default) > template (mode='') is invoked when there is no 'postgres-mode' > version of the template, but otherwise the 'postgres-mode' version of > the template is invoked. Your 'postgres-mode' templates will > xsl:call-template the default template, adding whatever they want to > the output produced by the default template. 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. Regards Karl <k...@karlpinc.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein