Data missing from rescued.xml
Running some stats on the <dicteg>
s, ECH discovered that a bunch of data is missing from these tags in the rescued.xml file. Tracing back through the original process I followed (and thankfully documented carefully here), it seems that the data was discarded unintentionally during the final phase:
- Ran
rescued_empties_removed_expanded_fixed.xml
throughcollapse_forms_etc.xsl
to producerescued_empties_removed_expanded_fixed_forms_collapsed.xml
.
This process changed data that looks like this:
<dicteg> <cit> <quote>√yə́ʕˀʷ+yəʕˀʷ‐t sn̩cʼələx̣ʷqén<gloss>*strong whirlwind</gloss> </quote> <bibl>JM2.194.7</bibl> </cit> </dicteg>
to this:
<dicteg> <cit> <quote> <seg><gloss>strong</gloss> whirlwind</seg> <bibl>JM2.194.7</bibl> </quote> </cit> </dicteg> <dicteg>
This can be remedied by re-running that final step once I've figured out the problem. Since rescued.xml was created, it has been edited, but only to the extent of deleting about a dozen entries which have been confirmed as dupes or migrated into the main files; it should be easy to discover which these are and remove them.
The problem seems to lie with these two bits of XSLT, although I can't actually see what's wrong with them:
<xsl:variable name="tagFirstTextInQuoteAsPhr" select="true()"/>
<xsl:for-each select="./node()"> <xsl:choose> <xsl:when test="self::text() and not(preceding-sibling::node())"> <!-- Wrap the first text node in a phr tag. --> <xsl:if test="$tagFirstTextInQuoteAsPhr = true()"> <phr type="n"><xsl:value-of select="."/></phr><xsl:text> </xsl:text> <!--Append any <bibl> which is a following-sibling of the parent <quote>.--> <xsl:if test="(parent::node()/following-sibling::bibl) and ($moveBiblIntoQuote = true())"><xsl:copy-of select="parent::node()/following-sibling::bibl"/><xsl:text> </xsl:text></xsl:if> </xsl:if> </xsl:when> <xsl:otherwise> <!-- Apply templates to everything else. --> <xsl:apply-templates select="." /> </xsl:otherwise> </xsl:choose> </xsl:for-each>