From: Lady Date: Tue, 20 Aug 2024 06:22:17 +0000 (-0400) Subject: Improve <书社:apply-attributes>, @书社:archived-as X-Git-Tag: 0.12.4~1 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/070f5743ea9121df02cf1717c806531703dd7899 Improve <书社:apply-attributes>, @书社:archived-as - `<书社:apply-attributes>` should not prevent H·T·M·L from wrapping. Note that the H·T·M·L wrapper is still not `<书社:apply-attributes>`‐aware; it will _not_ seek into the wrapped contents to search for attributes to pull upwards to the root element. This could probably be improved. - `@书社:archived-as` can now be applied to `<书社:link>` and will be passed down to any embedded contents. - `@书社:archived-as` will not be deleted during attribute application onto the root element; it now ensures there is a nonroot, nonarchive ancestor. This is required because archive children are processed into a separate document prior to application. An alternative approach might be to wrap archive children in a `<书社:archive>` element before application and then strip it after, but this is a fair bit of added work for little benefit. It’s a fair question whether removing invalid `@书社:*` attributes like this is even a good practice—invalid `<书社:link>` elements are maintained, in contrast. --- diff --git a/lib/catalog2transform.xslt b/lib/catalog2transform.xslt index 05ca7d5..2c555e3 100644 --- a/lib/catalog2transform.xslt +++ b/lib/catalog2transform.xslt @@ -143,7 +143,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - + @@ -262,10 +262,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - + + - + @@ -343,13 +344,15 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one + + - + - + @@ -382,6 +385,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one + @@ -421,10 +425,26 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - + + + + + + + + + - + + + + + + + + +