不调用模板而是调用重复项

时间:2014-04-21 11:53:05

标签: xslt xslt-2.0

我是以下的XML文件。

<?xml version="1.0" encoding="UTF-8"?>
<case lang="en" type="Report" source="original">
    <case.head corrigendum="no">
        <party.line corrigendum="no" lang="en">
            <party role="Plaintiff">Calandra Shipping Co Ltd</party>
            <party role="Defendant">Noor Maritime Ltd</party>
        </party.line>
        <citation.group>
            <primary.citation>[2014] 2 HKLRD 242</primary.citation>
            <parallel.citation type="Unreported">[2014] HKEC 358</parallel.citation>
            <parallel.citation type="West.serial">2032232952</parallel.citation>
            <parallel.citation type="WL.cite">2014 WL 6336</parallel.citation>
        </citation.group>
        <court.line>
            <court type="court">CFI</court>
        </court.line>
        <case.ref.no.group>
            <case.ref.no>
                <prefix>HCAJ</prefix>
                <number>109</number>
                <year>2011</year>
            </case.ref.no>
        </case.ref.no.group>
        <judge.line type="chambers" lang="en">
            <judge>
                <name>Peter Ng</name>
                <job.title prefix="no">J</job.title>
            </judge>
        </judge.line>
        <publication_date yyyymmdd="20140305"/>
        <date.group lang="en">
            <date.line>Date of Hearing: <date yyyymmdd="20130918" significance="hearing" type="Unreported">18 September 2013</date></date.line>
            <date.line>Date of Decision: <date yyyymmdd="20130918" significance="judgment" type="Report">18 September 2013</date></date.line>
        </date.group>
        <counsel.group lang="en">
            <counsel.line>Mr George Lamplough of Holman Fenwick Willan, for the plaintiff.</counsel.line>
            <counsel.line>Mr Kim Min Ju, instructed by Hart Giles, for the defendant.</counsel.line>
        </counsel.group>
    </case.head>
    <catchwords.group>
        <catchwords type="Report" lang="en">
            <catchword level="1" index="yes" italic="no">Admiralty</catchword>
            <catchword level="2" index="yes" italic="no">collision claim</catchword>
            <catchword level="3" index="yes" italic="no">application for order under O.75 r.18(10) that plaintiff file particulars of damages and that damages be assessed before trial on liability</catchword>
            <catchword index="yes" italic="no">to be made to Registrar, not judge</catchword>
            <catchword index="yes" italic="no">trial on liability to occur before assessment of damages unless cogent reasons for reversal of order</catchword>
            <catchword index="yes" italic="no">Rules of the High Court (Cap.4A, Sub.Leg.) O.75 r.18(10)</catchword>
        </catchwords>
        <catchwords type="Report" lang="zh">
            <catchword level="1" index="yes" italic="no">海事</catchword>
            <catchword level="2" index="yes" italic="no">有關碰撞的申索</catchword>
            <catchword level="3" index="yes" italic="no">根據第75號命令第18(10)條規則申請有關原告人存檔損害賠償的詳情以及在審訊法律責任事宜之前對損害賠償進行評估的命令</catchword>
            <catchword index="yes" italic="no">向司法常務官而不是向法官作出申請</catchword>
            <catchword index="yes" italic="no">除非具有力的理由逆轉相關的次序,否則法律責任事宜之審訊應於評估損害賠償之前進行</catchword>
            <catchword index="yes" italic="no">《高等法院規則》 (第4A章,附屬法例)第75號命令第18(10)條規則</catchword>
        </catchwords>
    </catchwords.group>
    <headnotes lang="en">
        <para>P brought proceedings against D following a collision involving their ships. D applied to the Court for an order under O.75 r.18(10) of the Rules of the High Court (Cap.4A, Sub.Leg.) (RHC) that P file and serve on D particulars of the damages claimed and that damages be assessed prior to the trial on liability. Order 75 r.18(11) provides that where an order is made under r.18(10), the claim shall be treated as referred to the Registrar for assessment and rr.41 and 42 shall apply unless the Registrar otherwise directs.</para>
        <para>
            <emphasis type="bold">Held</emphasis>, dismissing the application, that:<list>
                <list.item><label>(1)</label>An application for the filing of particulars of damages and for assessment of damages under O.75 r.18(10) of the RHC shall be heard by the Registrar, even if it was made after the issue of a case management summons which shall be heard by a judge. (See paras.3, 5–6.)</list.item>
                <list.item><label>(2)</label>The Court would follow the RHC as far as possible, with suitable flexibility if the circumstances of the case warranted it. For this reason alone, the application was defective. (See para.7.)</list.item>
                <list.item><label>(3)</label>There was a more fundamental objection. It was long-established practice in collision actions for there to be a trial of liability first and then assessment of damages by the Registrar. The order would be reversed only for cogent reasons and none existed here. (See paras.9–12.)</list.item>
                <list.item><label>(4)</label>Further, O.75 r.18(10) and (11) went hand in hand. Given D’s concession that it was not seeking a reference to the Registrar for assessment of damages at this stage, there was no other legal basis to make an order under r.18(10). (See para.12.)  <emphasis type="italic"></emphasis> </list.item></list>
        </para>
        <para.group>
            <heading>Application</heading>
            <para>This was an application by the defendant for an order under O.75 r.18(10) of the Rules of the High Court that the plaintiff file and serve on the defendant particulars of the damages claimed and that damages be assessed before the trial on liability in an action involving the collision of the parties’ respective ships. The facts are set out in the judgment.</para>
        </para.group>
    </headnotes>
    <ref.group>
        <leg.mentioned>
            <leg.ref country="Hong Kong" considered="yes">
                <citetitle type="leg" full="Rules of the High Court (Cap.4A, Sub.Leg.)" legtype="sub_leg">Rules of the High Court (Cap.4A, Sub.Leg.)</citetitle>
                <leg.ptr.group>
                    <leg.ptr provision="O." print="yes">75 rr.18(10)</leg.ptr>
                    <leg.ptr provision="O.75 r." print="no">18(11)</leg.ptr>
                </leg.ptr.group>
            </leg.ref>
            <leg.ref country="Hong Kong" considered="yes">
                <citetitle type="leg" full="《高等法院規則》 (第4A章,附屬法例)" legtype="sub_leg">《高等法院規則》 (第4A章,附屬法例)</citetitle>
                <leg.ptr.group>
                    <leg.ptr provision="第" print="yes">75號命令第18(10)、18(11)條規則</leg.ptr>
                </leg.ptr.group>
            </leg.ref>
            <leg.ref country="Hong Kong" considered="no">
                <citetitle type="leg" full="Rules of the High Court (Cap.4A, Sub.Leg.)" legtype="sub_leg">Rules of the High Court (Cap.4A, Sub.Leg.)</citetitle>
                <leg.ptr.group>
                    <leg.ptr provision="O." print="yes">75 rr.18(10)</leg.ptr>
                    <leg.ptr provision="O.75 r." print="no">18(11)</leg.ptr>
                    <leg.ptr provision="O.75 r." print="no">25(1)(c)</leg.ptr>
                    <leg.ptr provision="O.75 r." print="no">41</leg.ptr>
                    <leg.ptr provision="O.75 r." print="no">42</leg.ptr>
                </leg.ptr.group>
            </leg.ref>
        </leg.mentioned>
        <other.mentioned> 
            <other.ref type="Books"><author></author><book.title>Hong Kong Civil Procedure 2013</book.title><ed_vol>p.1319 para.75/41/2</ed_vol></other.ref>
            <other.ref type="Books"><author>Marsden</author><book.title>Collisions at Sea</book.title><ed_vol>(13th ed., 2003), para.18-01</ed_vol></other.ref>
        </other.mentioned>
    </ref.group>
    <judgment lang="en">
        <judge.block>
            <heading align="left">Peter Ng J</heading>
            <para><label>1.</label> This is a collision action. The collision took place on 18 July 2011 in the East China Sea. It involved two ships, <emphasis type="italic">viz</emphasis> the Calandra owned by the plaintiff and the Rainbow owned by the defendant. The Rainbow sank as a result of the collision and the Calandra suffered damage. The parties have filed preliminary acts in which they blamed each other for the collision.</para>
            <para><label>2.</label> There is before me an application by the defendant for an order under O.75 r.18(10) of the Rules of the High Court that the plaintiff do file and serve on the defendant particulars of the damages claimed and that the damages be assessed prior to the trial on liability.</para>
            <para><label>3.</label> The rule clearly provides that the application must be made by summons to the Registrar even if it is made after the issue of a case management summons.</para>
            <para><label>4.</label> This is to be contrasted with O.75 r.25(1)(c) which says the Case Management Conference (CMC) shall be heard by a judge in person, unless a judge in person otherwise directs.</para>
            <para><label>5.</label> It seems to me the intention of the rules is reasonably clear: CMC must be heard by a judge, whereas an application for the filing of particulars of damages and for assessment of damages shall be heard by the Registrar. </para>
            <para><label>6.</label> The reason for this distinction is not difficult to understand: the matters to be dealt with at the CMC are directions for trial of liability which is always heard by a judge. The assessment of damages is normally heard by the Registrar. In fact, O.75 r.18(11) provides that where an order is made under para.10, the claim shall be treated as referred to the Registrar for assessment and rr.41 and 42 shall apply unless the Registrar otherwise directs. So it makes sense for the application under O.75 r.18(10) to be heard by the Registrar as he would have to follow it up if he decides to make an order. </para>
            <para><label>7.</label> The practice of this Court is to follow the rules as far as possible, with suitable flexibility if the circumstances of the case warrant it.</para>
            <para><label>8.</label> For that reason alone, the application is defective. </para>
            <para><label>9.</label> But I would not decide this application simply on such a basis. There is a more fundamental objection to the application. </para>
            <para><label>10.</label>    It is a long-established practice of the English admiralty court, after liability has been determined, to refer to the Registrar the matter of assessment of damages: <emphasis type="italic">Hong Kong Civil Procedure 2013</emphasis> para.75/41/2. It is also the norm in collision actions for there to be a trial of liability first before assessment of damages: <emphasis type="italic">Marsden Collisions at Sea</emphasis> (13th ed., 2003), para.18-01.</para>
            <para><label>11.</label>    If this order is to be reversed, it would only be reversed if cogent reasons are put forward. </para>
            <para><label>12.</label>    No such reasons exist in the present case. No doubt, because of that, Mr Kim for the defendant very properly concedes that he is not seeking a reference to the Registrar for assessment of damages in the present case. But if he is not seeking a reference to the Registrar at this stage, there is no other legal basis for the defendant to seek particulars of damages. As I said, O.75 r.18(10) and (11) go hand in hand. Rule 18(11) provides that where an order is made under para.10, the claim shall be treated as referred to the Registrar for assessment. If the defendant is not seeking a reference to the Registrar, there is no legal justification to make an order under r.18(10) at all. </para>
            <para break="yes"><label>13.</label>    For these reasons, I would dismiss the application.</para>
            <para.group>
                <heading align="right">Reported by Shin Su Wen</heading>
            </para.group>
        </judge.block>
    </judgment>
</case>

以及下面的XSLT。

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">



  <xsl:output method="html"/>

  <xsl:template match="/">
    <html>
      <head>
        <xsl:text disable-output-escaping="yes"><![CDATA[</meta>]]></xsl:text>
        <link rel="stylesheet" href="C:\Users\u0138039\Desktop\Proview\Periodicals\XSLTS\NEW_289.css" type="text/css"></link>
      </head>
      <body>
        <section class="tr_chapter">
          <div class="chapter">
            <xsl:apply-templates/>
          </div>
        </section>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="case">
    <xsl:apply-templates select="case.head"/>
  </xsl:template>
  <xsl:template match="case.head">
    <div class="section-sect0">
      <div class="para">
        <xsl:value-of select="./party.line/party[@role='Plaintiff']"/>

      </div>
    </div>
    <div class="section-sect0">
      <div class="para">
        <xsl:text disable-output-escaping="yes">and</xsl:text>
      </div>
    </div>
    <div class="section-sect0">
      <div class="para">
        <xsl:value-of select="./party.line/party[@role='Defendant']"/>
      </div>
    </div>
    <xsl:apply-templates select="court.line|case.ref.no.group |judge.line|judgement"/>
  </xsl:template>
  <xsl:template match="para">
    <div class="para">
      <xsl:apply-templates/>
    </div>
  </xsl:template>

<xsl:template match="court.line">
<hr></hr>
<br />
<div class="align-center">


    <xsl:text>(</xsl:text>
<xsl:choose>
    <xsl:when test="contains(./court/text(),'CFI')">
<xsl:text>Court of First Instance</xsl:text>
</xsl:when>
<xsl:when test="contains(./court/text(),'CA')">
<xsl:text>Court of Appeal</xsl:text>
</xsl:when>

</xsl:choose>
    <xsl:text>)</xsl:text>
    </div>
</xsl:template>




  <xsl:template match="case.ref.no.group" name="new">

  <xsl:for-each select="case.ref.no">

    <div class="align-center">
     <xsl:text>(</xsl:text>

<xsl:choose>
<xsl:when test="contains(./prefix,'HCAJ')">
    <xsl:text>Admiralty Action No </xsl:text>
</xsl:when>
<xsl:when test="contains(./prefix,'HCAL')">
    <xsl:text>Constitutional and Administrative Law List No </xsl:text>
    </xsl:when>
    <xsl:when test="contains(./prefix,'CAAR')">
    <xsl:text>Application for Review No </xsl:text>
    </xsl:when>
    <xsl:when test="contains(./prefix,'CACV')">
    <xsl:text>Civil Appeal No </xsl:text>
    </xsl:when>
    <xsl:when test="contains(./prefix,'HCMP')">
    <xsl:text>Miscellaneous Proceedings No </xsl:text>
    </xsl:when>
    <xsl:when test="contains(./prefix,'HCMA')">
    <xsl:text>Magistracy Appeal No </xsl:text>
    </xsl:when>
</xsl:choose>
<xsl:value-of select="./number"/>
     <xsl:text> of </xsl:text>
 <xsl:value-of select="./year"/>    
     <xsl:text>)</xsl:text>
    </div>
    </xsl:for-each>
    <br />
    <hr></hr>
  </xsl:template>

  <xsl:template match="judge.line">
    <div class="section-sect3">
      <xsl:for-each select="judge">
        <xsl:value-of select="name"/>
        <xsl:text> </xsl:text>
        <xsl:value-of select="job.title"/>
        <xsl:if test="not(position() = last())">
          <xsl:text>,</xsl:text>
        </xsl:if>
      </xsl:for-each>
      <xsl:text> in </xsl:text>
      <xsl:value-of select="concat(upper-case(substring(./@type,1,1)),substring(./@type,2))"/>
    </div>
    <xsl:apply-templates select="following-sibling::date.group"></xsl:apply-templates>
  </xsl:template>
  <xsl:template match="date.group">
    <div class="section-sect4">
      <div class="para">
        <xsl:value-of select="./date.line/date"/>
      </div>
    </div>
   <xsl:apply-templates select="//catchwords.group/catchwords[@lang='en']"/>
    <xsl:apply-templates select="//ref.group" mode="x"/>

  </xsl:template>



  <xsl:template match="catchwords.group/catchwords[@lang='en']">
    <div class="y">
      <xsl:for-each select="catchword">

        <xsl:choose>

          <xsl:when test="@level=1"><br/>
            <span class="font-style-bolditalic">
              <xsl:value-of select="."/>
             </span>
            <xsl:text disable-output-escaping="yes">-</xsl:text>
          </xsl:when>
          <xsl:otherwise>

            <xsl:for-each select=".">

              <xsl:value-of select="."></xsl:value-of>
              <xsl:if test="not(position() = last()-1)">
                <xsl:text disable-output-escaping="yes"> – </xsl:text>
              </xsl:if>


            </xsl:for-each>

          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </div>



  </xsl:template>


  <xsl:template match="ref.group/leg.mentioned" mode="x">

    <xsl:for-each select="./leg.ref">
    <xsl:if test="./@considered='yes'">

      <div class="para">
        <xsl:value-of select="citetitle"/>
        <xsl:text>, </xsl:text>
        <xsl:for-each select="./leg.ptr.group/leg.ptr">
          <xsl:value-of select="."/>
          <xsl:if test="not(position() = last())">
            <xsl:text disable-output-escaping="yes">, </xsl:text>
          </xsl:if>
        </xsl:for-each>
      </div>
   </xsl:if>    
   </xsl:for-each>

<xsl:apply-templates select="//catchwords.group/catchwords[@lang='zh']"/>

  </xsl:template>




  <xsl:template match="catchwords.group/catchwords[@lang='zh']">
    <div class="y">
      <xsl:for-each select="catchword">
        <xsl:choose>
          <xsl:when test="@level=1"><br/>
            <span class="font-style-bolditalic">
              <xsl:value-of select="."/>
             </span>
            <xsl:text disable-output-escaping="yes">-</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:for-each select=".">
              <xsl:value-of select="."></xsl:value-of>
              <xsl:if test="not(position() = last()-1)">
                <xsl:text disable-output-escaping="yes"> – </xsl:text>
              </xsl:if>
            </xsl:for-each>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </div>
    <xsl:apply-templates select="//headnotes"/>
  </xsl:template>


    <xsl:template match="headnotes/para">
    <xsl:choose>
      <xsl:when test="position()=1">
        <div class="x">
          <xsl:apply-templates></xsl:apply-templates>
        </div>
      </xsl:when>
      <xsl:otherwise>
        <div class="m">
          <xsl:apply-templates/>
        </div>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:apply-templates select="para.group"/>
  </xsl:template>

   <xsl:template match="para.group">
    <div class="section-sect1">
      <xsl:value-of select="./heading"/>
    </div>
  <xsl:for-each select="./para">
     <div class="para">
        <xsl:apply-templates select="node()[not(self::label)]"/>
     </div>
    </xsl:for-each>
    <xsl:apply-templates select="//counsel.group"/>
  </xsl:template>
  <xsl:template name="orderedlist" match="list">
    <ol class="eng-orderedlist orderedlist">
      <xsl:apply-templates select="list.item/label"/>
    </ol>
  </xsl:template>
  <xsl:template name="orderitempara" match="list.item/label">
   <li class="item">
      <div class="para">
        <span class="item-num">

          <xsl:choose>
            <xsl:when test="following-sibling::case.considered">
              <xsl:apply-templates/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="."/>
            </xsl:otherwise>
          </xsl:choose>

        </span>

        <xsl:apply-templates select="parent::list.item"/>
      </div>
    </li>
  </xsl:template>
 <xsl:template match="list.item">
    <xsl:variable name="a">
      <xsl:value-of select="./label"/>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="./label">
        <xsl:apply-templates select="child::node()[not(self::label|case.ref)]"/>
      </xsl:when>

    </xsl:choose>

  </xsl:template>
    <xsl:template match="counsel.group" name="j">

    <xsl:for-each select="./counsel.line">
    <div class="para">
        <xsl:value-of select="."/>
      </div>
    </xsl:for-each>
    <xsl:apply-templates select="//ref.group/leg.mentioned" mode="y"/>
  </xsl:template>

 <xsl:template match="ref.group/leg.mentioned" mode="y">



    <xsl:for-each select="./leg.ref">
    <xsl:if test="./@considered='no'">
      <div class="section-sect1">
      <xsl:text>Legislation mentioned in the judgment</xsl:text>
    </div>
      <div class="para">
        <xsl:value-of select="citetitle"/>
        <xsl:text>, </xsl:text>
        <xsl:for-each select="./leg.ptr.group/leg.ptr">
          <xsl:value-of select="."/>
          <xsl:if test="not(position() = last())">
            <xsl:text disable-output-escaping="yes">, </xsl:text>
          </xsl:if>
        </xsl:for-each>
      </div></xsl:if>

    </xsl:for-each>
    <xsl:choose>
                    <xsl:when test="following-sibling::other.mentioned">
                    <div class="section-sect1">
    <xsl:text>Other materials mentioned in the judgment</xsl:text>
    </div>  
<xsl:apply-templates select="following-sibling::other.mentioned"/>

                    </xsl:when>
                    <xsl:otherwise>
                    <div class="section-sect1">
    <xsl:text>Cases cited in the judgment</xsl:text>
    </div>  
    <xsl:apply-templates select="//case.considered"/>    
                    </xsl:otherwise>
                </xsl:choose>


  </xsl:template>

<xsl:template match="other.mentioned">
    <xsl:for-each select="other.ref">
        <div class="para">
        <xsl:if test="./author/text()">
            <xsl:value-of select="./author"/>
            <xsl:text>, </xsl:text>
        </xsl:if>
            <span class="font-style-italic">
                <xsl:value-of select="./book.title"/>
            </span>
            <xsl:text> </xsl:text>
            <xsl:value-of select="./ed_vol"/>
        </div>
    </xsl:for-each>
</xsl:template>

<xsl:template match="case.considered">
<xsl:for-each select=".">
<div class="para">
      <xsl:if test="./case.ref">

        <span class="font-style-italic">

            <xsl:value-of select="./case.ref/citetitle[@full]"/></span>
    <xsl:text> </xsl:text>        
    <xsl:value-of select="./case.ref/citecitation/@full"/>



      </xsl:if></div>
    </xsl:for-each>

</xsl:template>
  <xsl:template match="judgment">
    <div class="section-sect1">
      <xsl:value-of select="./judge.block/heading"/>
    </div>

    <xsl:for-each select="./judge.block/para">
      <div class="para">
        <span class="new">
          <xsl:value-of select="./label"></xsl:value-of>
        </span>
        <xsl:apply-templates select="child::node()[not(self::label)]"/>
      </div>

    </xsl:for-each>

    <xsl:for-each select="./judge.block/para.group">
      <xsl:if test="./heading">
        <div class="section-sect1">
          <xsl:value-of select="./heading/text()"/>
        </div>
      </xsl:if>
      <xsl:for-each select="para">

        <div class="para">
          <span class="new">

            <xsl:value-of select="./label"></xsl:value-of>
          </span>
          <!--<xsl:value-of select="./text()"/>-->
          <xsl:apply-templates select="child::node()[not(self::label)]"/>
        </div>
        <xsl:apply-templates select="./list"/>
      </xsl:for-each>
    </xsl:for-each>

  </xsl:template>
<xsl:template match="block.quote">
<xsl:choose>
<xsl:when test="./list">
<xsl:apply-templates select="list"/>
</xsl:when>

    <xsl:when test="./para"><xsl:for-each select="./para">

        <div class="extract">


            <xsl:apply-templates select="."/>
        </div>
        </xsl:for-each></xsl:when>

<xsl:when test="./para.group">
<xsl:for-each select="./para.group">
        <div class="ali-itl">
            <xsl:value-of select="./heading"/>
        </div>
        <xsl:choose>
                                    <xsl:when test="./para.group"><xsl:for-each select="./para.group">
        <xsl:if test="./para">
        <div class="ali-itl">
            <xsl:value-of select="./heading"/>
        </div>

        <div class="extract">
        <div class="para"><xsl:if test="./para/label">
        <div class="new">
        <xsl:value-of select="./para.group/para/label"/>
        </div></xsl:if>
            <xsl:apply-templates select="./para/text()"/>
        </div></div></xsl:if>
        </xsl:for-each>

                                    </xsl:when>
                                    <xsl:otherwise>


        <div class="extract">
        <div class="para"><xsl:if test="./para/label">
        <div class="new">
        <xsl:value-of select="./para.group/para/label"/>
        </div></xsl:if>
            <xsl:apply-templates select="./para/text()"/>
        </div></div>        

                                    </xsl:otherwise>
                                </xsl:choose>

        </xsl:for-each></xsl:when>
</xsl:choose>




</xsl:template>
  <xsl:template match="emphasis">
    <xsl:choose>
      <xsl:when test="citetitle">
        <span class="font-style-italic">
          <xsl:apply-templates select="./list.item"/>
        </span>

      </xsl:when>
      <xsl:when test="./@type">
        <xsl:variable name="fontStyle">
          <xsl:value-of select="concat('font-style-',@type)"/>
        </xsl:variable>
        <span class="{$fontStyle}">
          <xsl:apply-templates/>
        </span>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>





</xsl:stylesheet>

这里我试图调用判断模板,但它没有被调用但是当我调试时,有一些默认模板被调用,请让我知道如何调用判断模板。

由于

1 个答案:

答案 0 :(得分:2)

这是因为judgement不是case.head的孩子。此外,唯一存在的元素是judgment

替换以下行

<xsl:apply-templates select="court.line|case.ref.no.group |judge.line|judgement"/>

<xsl:apply-templates select="court.line|case.ref.no.group |judge.line|../judgment"/>