Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParlaMint2release breaks CZ named entities #702

Closed
matyaskopp opened this issue Jul 3, 2023 · 1 comment
Closed

ParlaMint2release breaks CZ named entities #702

matyaskopp opened this issue Jul 3, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@matyaskopp
Copy link
Collaborator

This tries to fix invalid named entities, but it breaks nested entities:

<!-- 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>

should be:

  <!-- 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)

@matyaskopp matyaskopp added the bug Something isn't working label Jul 3, 2023
@matyaskopp matyaskopp added this to the ParlaMint 3.1 release milestone Jul 3, 2023
@TomazErjavec
Copy link
Collaborator

Thanks for noticing, fixed now. As discussed it might be a good idea to remove special CZ NEs anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants