From: Lady Date: Sat, 20 Jan 2024 17:02:33 +0000 (-0500) Subject: Pass single result tree to modes in wrapper X-Git-Tag: 0.4.2^0 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/bf451bf2f46fd1ea21f925ee02db620859cf2100?ds=sidebyside Pass single result tree to modes in wrapper When matching a `` inside of a `书社:metadata` transform, it’s useful to be able to easily match elements in the result. Right now, that requires a reference to the little‐documented variable `$书社:result`, because `` elements don’t belong to the same document as result tree elements. This commit creates a new tree which simply copies over all the result nodes and all of the `` elements, and then passes that to the modal templates. Consequently, matches like `/html:div` or `/xslt:include` should work regardless of what the current context node is. --- diff --git a/lib/catalog2transform.xslt b/lib/catalog2transform.xslt index 1d36bb1..92dcaf9 100644 --- a/lib/catalog2transform.xslt +++ b/lib/catalog2transform.xslt @@ -121,10 +121,13 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one + + + + - - + @@ -166,11 +169,9 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - - + - - +