From: Lady Date: Mon, 1 Jan 2024 18:40:20 +0000 (-0500) Subject: Allow inserting nodes before and after result X-Git-Tag: 0.2.0~5 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/dbdfdb93a22caed9398f9523e85e4ccef37468cc?ds=inline;hp=3cf024ba39dd17687e1b66e4aeb2f140342b1993 Allow inserting nodes before and after result This commit adds two new modes akin to `书社:metadata`: `书社:header`, which supplies nodes to insert at the beginning of the ``, and `书社:footer`, which supplies nodes to insert at the end. Like `书社:metadata`, these modes do not run if output wrapping is disabled. --- diff --git a/README.markdown b/README.markdown index 681e8c4..893ac2c 100644 --- a/README.markdown +++ b/README.markdown @@ -319,6 +319,14 @@ After performing the initial transform, ⛩️📰 书社 will match the root node of the result in the following modes to fill in areas of the wrapper :⁠— +- **`书社:header`:** + The result of matching in this mode is prepended into the + `` of the output (before the transformation result). + +- **`书社:footer`:** + The result of matching in this mode is appended into the + `` of the output (after the transformation result). + - **`书社:metadata`:** The result of matching in this mode is inserted into the `` of the output. diff --git a/lib/catalog2transform.xslt b/lib/catalog2transform.xslt index 6044a13..2a3bc71 100644 --- a/lib/catalog2transform.xslt +++ b/lib/catalog2transform.xslt @@ -106,6 +106,8 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one + + @@ -128,7 +130,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one + + + +