comparison summa/bilingual/merge.xsl @ 67:734a1915d5e2

missed h4 in fallback case
author ht
date Sun, 03 Jan 2010 18:46:03 +0000
parents 036ea6d3e18b
children f34d539f9b78
comparison
equal deleted inserted replaced
66:f17b1346319e 67:734a1915d5e2
50 <xsl:message>Can't merge article <xsl:value-of select="@id"/>, <xsl:value-of select="count(x:p)"/>!=<xsl:value-of select="count($lp)"/></xsl:message> 50 <xsl:message>Can't merge article <xsl:value-of select="@id"/>, <xsl:value-of select="count(x:p)"/>!=<xsl:value-of select="count($lp)"/></xsl:message>
51 <!-- Try to split on keywords in English --> 51 <!-- Try to split on keywords in English -->
52 <xsl:variable name="pb" select="count(x:p/x:b[starts-with(.,'Objection') or (.='On the contrary,') or (.='I answer that,') or starts-with(.,'Reply to ')])"/> 52 <xsl:variable name="pb" select="count(x:p/x:b[starts-with(.,'Objection') or (.='On the contrary,') or (.='I answer that,') or starts-with(.,'Reply to ')])"/>
53 <xsl:choose> 53 <xsl:choose>
54 <xsl:when test="$pb=count($lp)"> 54 <xsl:when test="$pb=count($lp)">
55 <xsl:for-each-group select="x:p" group-starting-with="x:p[x:b[starts-with(.,'Objection') or (.='On the contrary,') or (.='I answer that,') or starts-with(.,'Reply to ')]]"> 55 <xsl:copy>
56 <xsl:apply-templates select="@*|x:h4"/>
57 <xsl:for-each-group select="x:p" group-starting-with="x:p[x:b[starts-with(.,'Objection') or (.='On the contrary,') or (.='I answer that,') or starts-with(.,'Reply to ')]]">
56 <xsl:variable name="i" select="position()"/> 58 <xsl:variable name="i" select="position()"/>
57 <xsl:call-template name="doBi"> 59 <xsl:call-template name="doBi">
58 <xsl:with-param select="current-group()" name="english"/> 60 <xsl:with-param select="current-group()" name="english"/>
59 <xsl:with-param select="$lp[position()=$i]" name="latin"/> 61 <xsl:with-param select="$lp[position()=$i]" name="latin"/>
60 </xsl:call-template> 62 </xsl:call-template>
61 </xsl:for-each-group> 63 </xsl:for-each-group>
64 </xsl:copy>
62 </xsl:when> 65 </xsl:when>
63 <xsl:otherwise> 66 <xsl:otherwise>
64 <xsl:message>Still can't merge article <xsl:value-of select="@id"/>, <xsl:value-of select="$pb"/>!=<xsl:value-of select="count($lp)"/></xsl:message> 67 <xsl:message>Still can't merge article <xsl:value-of select="@id"/>, <xsl:value-of select="$pb"/>!=<xsl:value-of select="count($lp)"/></xsl:message>
65 </xsl:otherwise> 68 </xsl:otherwise>
66 </xsl:choose> 69 </xsl:choose>