3 <!--***********************************************************************-->
4 <!-- Extension to the XSLT version 0.07 of MathML content to presentation: -->
5 <!-- First draft: February 19 2000, Andrea Asperti, Irene Schena -->
6 <!-- Revised: March 3 2000, Irene Schena -->
7 <!-- Revised: March 15 2000, Claudio Sacerdoti Coen, Irene Schena -->
8 <!-- Revised: March 21 2000, Irene Schena -->
9 <!--***********************************************************************-->
11 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12 xmlns:m="http://www.w3.org/1998/Math/MathML"
13 xmlns:helm="http://www.cs.unibo.it/helm">
15 <xsl:import href="mml2mmlv1_0.xsl"/>
17 <!--***********************************************************************-->
18 <!-- Parameter affecting line-breaking -->
19 <!--***********************************************************************-->
21 <xsl:variable name="framewidth" select="30"/>
23 <!--***********************************************************************-->
24 <!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
25 <!-- math ma al di fuori di semantics. Ora vi sono tanti semantics quanti -->
26 <!-- sono i termini: la presentation per un termine e' generata come primo -->
27 <!-- figlio di un semantics e l'originario content viene inserito nel -->
28 <!-- nel secondo figlio di semantics, annotation-xml -->
29 <!--***********************************************************************-->
31 <!--**********************-->
33 <!--**********************-->
35 <xsl:template match="/">
36 <xsl:processing-instruction name="cocoon-format">type="text/xhtml"</xsl:processing-instruction>
37 <xsl:apply-templates select="*"/>
42 <xsl:template match="Definition">
44 <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
48 <m:mtext>DEFINITION <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
55 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
56 <xsl:apply-templates select="type/*[1]"/>
70 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
71 <xsl:apply-templates select="body/*[1]"/>
81 <xsl:template match="Axiom">
83 <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
87 <m:mtext>AXIOM <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>) OF TYPE</m:mtext>
94 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
95 <xsl:apply-templates select="type/*[1]"/>
103 <!-- UNFINISHED PROOF -->
105 <xsl:template match="CurrentProof">
107 <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
111 <m:mtext>UNFINISHED PROOF <xsl:value-of select="@name"/>(<xsl:if test="string(./Params) != """><xsl:value-of select="Params"/></xsl:if>)</m:mtext>
118 <m:mtext>THESIS:</m:mtext>
125 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
126 <xsl:apply-templates select="type/*[1]"/>
133 <m:mtext>CONJECTURES:</m:mtext>
137 <xsl:for-each select="Conjecture">
141 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
142 <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
143 <xsl:apply-templates select="./*[1]"/>
151 <m:mtext>CORRESPONDING PROOF:</m:mtext>
158 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
159 <xsl:apply-templates select="body/*[1]"/>
167 <!-- MUTUAL INDUCTIVE DEFINITION -->
169 <xsl:template match="InductiveDefinition">
171 <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
172 <xsl:for-each select="InductiveType">
177 <xsl:when test="position() = 1">
179 <xsl:when test="string(./@inductive) = "true"">
180 <m:mtext>INDUCTIVE DEFINITION</m:mtext>
183 <m:mtext>COINDUCTIVE DEFINITION</m:mtext>
188 <m:mtext>AND</m:mtext>
191 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
192 <m:mtext><xsl:value-of select="./@name"/>(<xsl:if test="string(../Params) != """><xsl:value-of select="../Params"/></xsl:if>)</m:mtext>
199 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
202 <xsl:when test="string(../Param) != """>
203 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
204 <xsl:for-each select="../Param">
208 <m:mi><xsl:value-of select="./@name"/></m:mi>
210 <xsl:apply-templates select="*"/>
234 <m:mtext>OF ARITY</m:mtext>
241 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
242 <xsl:apply-templates select="./arity/*[1]"/>
249 <m:mtext>BUILT FROM</m:mtext>
253 <xsl:for-each select="./Constructor">
258 <xsl:when test="position() = 1">
259 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
263 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
266 <m:mtext><xsl:value-of select="./@name"/> OF</m:mtext>
267 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
268 <xsl:apply-templates select="./*[1]"/>
280 <xsl:template match="Variable">
282 <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
286 <m:mtext>VARIABLE <xsl:value-of select="@name"/> OF TYPE</m:mtext>
293 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
294 <xsl:apply-templates select="type/*[1]"/>
302 <!--**********************-->
304 <!--**********************-->
306 <xsl:template match="m:bvar">
308 <xsl:when test="m:type">
309 <xsl:variable name="charlength">
310 <xsl:apply-templates select="m:ci" mode="charcount"/>
313 <xsl:when test="$charlength >= $framewidth">
314 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
317 <xsl:apply-templates select="m:ci"/>
323 <xsl:apply-templates select="m:type"/>
329 <xsl:apply-templates select="m:ci"/>
331 <xsl:apply-templates select="m:type"/>
336 <xsl:apply-templates select="m:ci"/>
344 <xsl:template match="m:apply[m:csymbol]">
345 <xsl:variable name="name"><xsl:value-of select="m:csymbol"/></xsl:variable>
346 <xsl:variable name="charlength"><xsl:apply-templates select="m:csymbol" mode="charcount"/></xsl:variable>
348 <xsl:if test="@helm:xref">
349 <xsl:attribute name="helm:xref"><xsl:value-of select="@helm:xref"/></xsl:attribute>
352 <xsl:when test="$name='prod'">
354 <xsl:when test="$charlength >= $framewidth">
355 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
358 <m:mo color="Blue">Π</m:mo>
359 <xsl:apply-templates select="m:bvar"/>
366 <xsl:apply-templates select="*[position()=3]"/>
373 <m:mo color="Blue">Π</m:mo>
374 <xsl:apply-templates select="m:bvar/m:ci"/>
376 <xsl:apply-templates select="m:bvar/m:type"/>
378 <xsl:apply-templates select="*[position()=3]"/>
382 <xsl:when test="$name='arrow'">
384 <xsl:when test="$charlength >= $framewidth">
385 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
389 <m:mo stretchy="false">(</m:mo>
390 <xsl:apply-templates select="*[position()=2]"/>
397 <m:mo color="Blue">→</m:mo>
398 <xsl:apply-templates select="*[position()=3]"/>
405 <m:mo stretchy="false">)</m:mo>
412 <m:mo stretchy="false">(</m:mo>
413 <xsl:apply-templates select="*[position()=2]"/>
414 <m:mo color="Blue">→</m:mo>
415 <xsl:apply-templates select="*[position()=3]"/>
416 <m:mo stretchy="false">)</m:mo>
420 <xsl:when test="$name='app'">
422 <xsl:when test="$charlength >= $framewidth">
423 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
427 <m:mo stretchy="false">(</m:mo>
428 <xsl:apply-templates select="*[position()=2]"/>
432 <xsl:for-each select="*[position()>2]">
436 <m:mphantom><m:mtext>(</m:mtext></m:mphantom>
437 <xsl:apply-templates select="."/>
445 <m:mo stretchy="false">)</m:mo>
452 <m:mo stretchy="false">(</m:mo>
453 <xsl:apply-templates select="*[position()=2]"/>
454 <xsl:for-each select="*[position()>2]">
455 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
456 <xsl:apply-templates select="."/>
458 <m:mo stretchy="false">)</m:mo>
462 <xsl:when test="$name='cast'">
464 <xsl:when test="$charlength >= $framewidth">
465 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
469 <m:mo stretchy="false">(</m:mo>
470 <xsl:apply-templates select="*[position()=2]"/>
477 <m:mo color="Yellow">:></m:mo>
478 <xsl:apply-templates select="*[position()=3]"/>
485 <m:mo stretchy="false">)</m:mo>
492 <m:mo stretchy="false">(</m:mo>
493 <xsl:apply-templates select="*[position()=2]"/>
494 <m:mo color="Yellow">:></m:mo>
495 <xsl:apply-templates select="*[position()=3]"/>
496 <m:mo stretchy="false">)</m:mo>
500 <xsl:when test="$name='Prop'">
503 <xsl:when test="$name='Set'">
506 <xsl:when test="$name='Type'">
509 <xsl:when test="$name='mutcase'">
511 <xsl:when test="$charlength >= $framewidth">
512 <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
513 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
518 <xsl:apply-templates select="*[position()=2]"/>
519 <xsl:if test="$framewidth > $charlength">
522 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
523 <xsl:apply-templates select="*[position()=3]"/>
528 <xsl:if test="$charlength >= $framewidth">
534 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
535 <xsl:apply-templates select="*[position()=3]"/>
547 <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
548 <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
553 <xsl:when test="position() = 1">
554 <m:mphantom><m:mtext>|</m:mtext></m:mphantom>
557 <m:mo stretchy="false">|</m:mo>
560 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
561 <xsl:apply-templates select="."/>
562 <xsl:if test="$framewidth > $charlength">
563 <m:mo color="Green">⇒</m:mo>
564 <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
569 <xsl:if test="$charlength >= $framewidth">
573 <m:mphantom><m:mtext>|_</m:mtext></m:mphantom>
574 <m:mo color="Green">⇒</m:mo>
575 <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
591 <m:mo><</m:mo><xsl:apply-templates select="*[position()=2]"/><m:mo>></m:mo>
593 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
594 <xsl:apply-templates select="*[position()=3]"/>
595 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
597 <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
599 <xsl:when test="position() != 1">
600 <m:mo stretchy="false">|</m:mo>
603 <xsl:apply-templates select="."/>
604 <m:mo color="Green">⇒</m:mo>
605 <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
607 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
612 <xsl:when test="$name='fix'">
614 <xsl:when test="$charlength >= $framewidth">
615 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
620 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
621 <m:mi><xsl:value-of select="m:ci"/></m:mi>
622 <m:mo stretchy="false">{</m:mo>
629 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
630 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
631 <xsl:for-each select="m:bvar">
632 <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
636 <m:mi><xsl:value-of select="m:ci"/></m:mi>
638 <xsl:if test="$framewidth > $charlength">
639 <xsl:apply-templates select="m:type"/>
644 <xsl:if test="$charlength >= $framewidth">
648 <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
649 <xsl:apply-templates select="m:type"/>
658 <xsl:apply-templates select="following-sibling::*[position()=1]"/>
670 <m:mo stretchy="false">}</m:mo>
678 <m:mi><xsl:value-of select="m:ci"/></m:mi>
679 <m:mo stretchy="false">{</m:mo>
680 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
681 <xsl:for-each select="m:bvar">
685 <m:mi><xsl:value-of select="m:ci"/></m:mi>
687 <xsl:apply-templates select="m:type"/>
689 <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
690 <xsl:if test="position()=last()">
691 <m:mo stretchy="false">}</m:mo>
701 <xsl:when test="$name='cofix'">
703 <xsl:when test="$charlength >= $framewidth">
704 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
709 <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
710 <m:mi><xsl:value-of select="m:ci"/></m:mi>
711 <m:mo stretchy="false">{</m:mo>
718 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
719 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
720 <xsl:for-each select="m:bvar">
721 <xsl:variable name="charlength"><xsl:apply-templates select="m:type" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
725 <m:mi><xsl:value-of select="m:ci"/></m:mi>
727 <xsl:if test="$framewidth > $charlength">
728 <xsl:apply-templates select="m:type"/>
733 <xsl:if test="$charlength >= $framewidth">
737 <m:mphantom><m:mtext>:=</m:mtext></m:mphantom>
738 <xsl:apply-templates select="m:type"/>
747 <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
759 <m:mo stretchy="false">}</m:mo>
767 <m:mi><xsl:value-of select="m:ci"/></m:mi>
768 <m:mo stretchy="false">{</m:mo>
769 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
770 <xsl:for-each select="m:bvar">
774 <m:mi><xsl:value-of select="m:ci"/></m:mi>
776 <xsl:apply-templates select="m:type"/>
778 <xsl:apply-templates select="following-sibling::*[position() = 1]"/>
779 <xsl:if test="position()=last()">
780 <m:mo stretchy="false">}</m:mo>
796 <xsl:template match="m:lambda">
797 <xsl:variable name="charlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"/></xsl:variable>
798 <m:mrow helm:xref="{@helm:xref}">
800 <xsl:when test="$charlength >= $framewidth">
801 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
804 <m:mo color="Red">λ</m:mo>
805 <xsl:apply-templates select="m:bvar"/>
812 <xsl:apply-templates select="*[position()=2]"/>
819 <m:mo color="Red">λ</m:mo>
820 <xsl:apply-templates select="m:bvar/m:ci"/>
822 <xsl:apply-templates select="m:bvar/m:type"/>
824 <xsl:apply-templates select="*[position()=2]"/>
830 <!-- *********************************** -->
831 <!-- BASE SET OF MATHML CONTENT ELEMENTS -->
832 <!-- *********************************** -->
836 <xsl:template match = "m:apply[m:eq[1]]">
837 <xsl:variable name="charlength">
838 <xsl:apply-templates select="*[1]" mode="charcount"/>
841 <xsl:when test="$charlength >= $framewidth">
842 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
843 <xsl:if test="@helm:xref">
844 <xsl:attribute name="helm:xref">
845 <xsl:value-of select="@helm:xref"/>
850 <m:mo stretchy="false">(</m:mo>
851 <xsl:apply-templates select="*[position()=2]"/>
854 <xsl:for-each select = "*[position()>2]">
857 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
858 <m:mo helm:xref="m:in/@helm:xref">
861 <xsl:apply-templates select="."/>
867 <m:mo stretchy="false">)</m:mo>
879 <xsl:template match = "m:apply[m:and[1]|m:or[1]
880 |m:geq[1]|m:leq[1]|m:gt[1]|m:lt[1]
881 |m:in[1]|m:intesect[1]|m:union[1]|m:subset[1]
882 |m:prsubset|m:setdiff[1]]">
883 <xsl:variable name="symbol">
885 <xsl:when test="m:and[1]">
886 <xsl:value-of select="'wedge'"/>
888 <xsl:when test="m:or[1]">
889 <xsl:value-of select="'vee'"/>
891 <xsl:when test="m:geq[1]">
892 <xsl:value-of select="'geq'"/>
894 <xsl:when test="m:leq[1]">
895 <xsl:value-of select="'leq'"/>
897 <xsl:when test="m:gt[1]">
898 <xsl:value-of select="'gt'"/>
900 <xsl:when test="m:lt[1]">
901 <xsl:value-of select="'lt'"/>
903 <xsl:when test="m:eq[1]">
904 <xsl:value-of select="'Equal'"/>
906 <xsl:when test="m:in[1]">
907 <xsl:value-of select="'Element'"/>
909 <xsl:when test="m:subset[1]">
910 <xsl:value-of select="'SubsetEqual'"/>
912 <xsl:when test="m:prsubset[1]">
913 <xsl:value-of select="'subset'"/>
915 <xsl:when test="m:intersect[1]">
916 <xsl:value-of select="'Intersection'"/>
918 <xsl:when test="m:union[1]">
919 <xsl:value-of select="'Union'"/>
921 <xsl:when test="m:setdiff[1]">
922 <xsl:value-of select="'Backslash'"/>
926 <xsl:variable name="charlength">
927 <xsl:apply-templates select="*[1]" mode="charcount"/>
930 <xsl:when test="$charlength >= $framewidth">
931 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
932 <xsl:if test="@helm:xref">
933 <xsl:attribute name="helm:xref">
934 <xsl:value-of select="@helm:xref"/>
939 <m:mo stretchy="false">(</m:mo>
940 <xsl:apply-templates select="*[position()=2]"/>
943 <xsl:for-each select = "*[position()>2]">
946 <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
947 <m:mo helm:xref="{*[1]/@helm:xref}">
948 <m:mchar name="{$symbol}"/>
950 <xsl:apply-templates select="."/>
956 <m:mo stretchy="false">)</m:mo>
967 <xsl:template match = "m:set">
969 <xsl:when test="count(child::*) = 0">
971 <m:mchar name="EmptySet"/>
975 <xsl:variable name="charlength">
976 <xsl:apply-templates select="*[1]" mode="charcount"/>
979 <xsl:when test="$charlength >= $framewidth">
981 <xsl:when test="name(*[1]) = 'm:bvar'">
982 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
985 <m:mo stretchy="false">{</m:mo>
986 <xsl:apply-templates select="*[position()=1]"/>
991 <m:mphantom><m:mtext>{</m:mtext></m:mphantom>
992 <m:mo stretchy="false">|</m:mo>
993 <xsl:apply-templates select="m:condition/*[1]"/>
998 <m:mo stretchy="false">}</m:mo>
1004 <m:mtable align="baseline 1" equalrows="false" columnalign="left">
1007 <m:mo stretchy="false">{</m:mo>
1008 <xsl:apply-templates select="*[position()=1]"/>
1009 <xsl:if test="position() != last()">
1014 <xsl:for-each select = "*[position()>2]">
1017 <m:mphantom><m:mtext>{</m:mtext></m:mphantom>
1018 <xsl:apply-templates select="."/>
1019 <xsl:if test="position() != last()">
1027 <m:mo stretchy="false">}</m:mo>
1035 <xsl:apply-imports/>
1042 <xsl:template match = "m:apply[m:card[1]]">
1043 <m:mo stretchy="false">|</m:mo>
1044 <xsl:apply-templates select="*[2]"/>
1045 <m:mo stretchy="false">|</m:mo>
1048 <!--**********************-->
1050 <!--**********************-->
1052 <xsl:template match="m:and|m:or|m:not|m:exists|m:eq|m:lt|m:leq|m:gt|m:geq
1053 |m:in|m:notin|m:intersect|m:union|m:subset|m:prsubset|m:card|m:setdiff" mode="charcount">
1054 <xsl:param name="incurrent_length" select="0"/>
1056 <xsl:when test="$framewidth > ($incurrent_length + 3 + string-length())">
1057 <xsl:variable name="siblength">
1058 <xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount">
1059 <xsl:with-param name="incurrent_length" select="$incurrent_length + string-length()"/>
1060 </xsl:apply-templates>
1063 <xsl:when test="string($siblength) = """>
1064 <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
1067 <xsl:value-of select="number($siblength)"/>
1072 <xsl:value-of select="$incurrent_length + 3 + string-length()"/>
1077 <xsl:template match="m:ci|m:csymbol" mode="charcount">
1078 <xsl:param name="incurrent_length" select="0"/>
1079 <xsl:param name="nosibling" select="0"/>
1081 <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
1082 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length + string-length()"/></xsl:apply-templates></xsl:variable>
1084 <xsl:when test="string($siblength) = """>
1085 <xsl:value-of select="$incurrent_length + string-length()"/>
1088 <xsl:value-of select="number($siblength)"/>
1093 <xsl:value-of select="$incurrent_length + string-length()"/>
1098 <xsl:template match="*" mode="charcount">
1099 <xsl:param name="incurrent_length" select="0"/>
1100 <xsl:param name="nosibling" select="0"/>
1102 <xsl:when test="count(child::*) = 0">
1103 <xsl:value-of select="$incurrent_length"/>
1106 <xsl:variable name="childlength"><xsl:apply-templates select="*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length"/><xsl:with-param name="nosibling" select="0"/></xsl:apply-templates></xsl:variable>
1108 <xsl:when test="$framewidth > number($childlength) and ($nosibling = 0)">
1109 <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$childlength"/></xsl:apply-templates></xsl:variable>
1111 <xsl:when test="string($siblength) = """>
1112 <xsl:value-of select="number($childlength)"/>
1115 <xsl:value-of select="number($siblength)"/>
1120 <xsl:value-of select="number($childlength)"/>