Edirom / MerMEId

Metadata Editor and Repository for MEI Data

Home Page:https://mermeid.edirom.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MerMEId creates invalid xml:id values

peterstadler opened this issue · comments

(in some cases) MerMEId creates invalid xml:id values like "xml:id_264d4e135a1048964" which results in error messages like "validity error : xml:id : attribute value xml:id_264d4e135a1048964 is not an NCName"

this happens e.g. for new files within mei/meiHead/workList/work/langUsage:

<langUsage>
    <language xml:id="xml:id_95d4e53a1048964" xml:lang=""/>
</langUsage>

It seems the template fill_in_id at

<xsl:template name="fill_in_id">
<xsl:variable name="generated_id" select="generate-id()"/>
<xsl:variable name="no_of_nodes" select="count(//*)"/>
<xsl:attribute name="xml:id">
<xsl:value-of select="concat(name(.),'_',$no_of_nodes,$generated_id)"/>
</xsl:attribute>
</xsl:template>
might be responsible for creating such IDs.