<!-- Bug where a name contains no words, but only a transcriber comment: remove <name> tag -->
<xsl:template mode="comp" match="tei:body//tei:name[not(.//tei:w)]">
<xsl:message select="concat('WARN ', /tei:TEI/@xml:id,
': removing name tag as name ', normalize-space(.),
' contains no words for ', ancestor-or-self::tei:*[@xml:id][1]/@xml:id)"/>
<xsl:apply-templates mode="comp"/>
</xsl:template>
tei:w changed to .//tei:w (looking for all descendants)
This tries to fix invalid named entities, but it breaks nested entities: https://github.com/clarin-eric/ParlaMint/blob/c68b7fe2bc4f27a85e8e8dbe08545035d0dc179e/Scripts/parlamint2release.xsl#L433-L439
should be:
tei:w
changed to.//tei:w
(looking for all descendants)