From: Lady <redacted>
Date: Sat, 22 Jun 2024 22:18:17 +0000 (-0400)
Subject: Don’t recognize title metadata in templates
X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/365bb51c11f7806f36da7e9382bcf03643a729ac?ds=inline;hp=3906b3ed495704281e4abf387ffbafe5ef0e2087

Don’t recognize title metadata in templates

Per H·T·M·L, the elements in templates are _not_ children, and these
semantics should be respected for microdata.
---

diff --git a/transforms/metadata.xslt b/transforms/metadata.xslt
index d1b19d1..71a10c5 100644
--- a/transforms/metadata.xslt
+++ b/transforms/metadata.xslt
@@ -12,7 +12,7 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v 2
 If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
 -->
 <!DOCTYPE transform [
-	<!ENTITY attoplevel "ancestor::html:*[@itemscope and @itemtype='&书社;:document'] and not(ancestor::html:*[@itemscope]/ancestor::html:*[@itemscope and @itemtype='&书社;:document'] or preceding::html:*[@itemtype='&书社;:document'])">
+	<!ENTITY attoplevel "not(ancestor::html:template) and ancestor::html:*[@itemscope and @itemtype='&书社;:document'] and not(ancestor::html:*[@itemscope]/ancestor::html:*[@itemscope and @itemtype='&书社;:document'] or preceding::html:*[@itemtype='&书社;:document'])">
 	<!ENTITY 书社 "urn:fdc:ladys.computer:20231231:Shu1She4">
 ]>
 <transform