我有下面的xslt。for循環沒有按預期結束
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ntw="Number2Word.uri" exclude-result-prefixes="ntw">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<xsl:text disable-output-escaping="yes"><![CDATA[</meta>]]></xsl:text>
<link rel="stylesheet" href="C:\Documents and Settings\u0138039\Desktop\Process\main.css" type="text/css"></link>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="case">
<xsl:apply-templates select="case.head"/>
</xsl:template>
<xsl:template match="case.head">
<section class="sect1">
<div class="para">
<xsl:value-of select="./party.line/party[@role='Plaintiff']"/>
</div>
</section>
<section class="sect1">
<div class="para">
<xsl:text disable-output-escaping="yes">V</xsl:text>
</div>
</section>
<section class="sect1">
<div class="para">
<xsl:value-of select="./party.line/party[@role='Defendant']"/>
</div>
</section>
<xsl:apply-templates select="case.ref.no.group | judge.line"/>
</xsl:template>
<xsl:template match="para">
<div class="para">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="case.ref.no.group">
<section class="sect2">
<xsl:text>Court of Appeal</xsl:text>
</section>
<xsl:text> - </xsl:text>
<xsl:value-of select="case.ref.no[1]/prefix" />
<xsl:text> Nos. </xsl:text>
<xsl:for-each select="case.ref.no">
<xsl:value-of select="number" />
<xsl:text>-</xsl:text>
<xsl:value-of select="year" />
<xsl:if test="not(position() = 2)">
<xsl:text> and </xsl:text>
</xsl:if>
</xsl:for-each>
<!--<xsl:apply-templates/>-->
</xsl:template>
<xsl:template match="judge.line">
<section class="sect3">
<xsl:for-each select="judge">
<xsl:value-of select="name"/>
<xsl:if test="not(position() = last())">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text> JJCA</xsl:text>
</section>
<xsl:apply-templates select="following-sibling::date.group"></xsl:apply-templates>
</xsl:template>
<xsl:template match="date.group">
<section class="sect4">
<div class="para">
<xsl:value-of select="./date.line/date"/>
</div>
</section>
<xsl:apply-templates select="//catchwords.group"/>
</xsl:template>
<xsl:template match="catchwords.group">
<div class="y">
<xsl:for-each select="catchwords/catchword">
<xsl:choose>
<xsl:when test="@level=1">
<section class="sect2">
<xsl:value-of select="."/>
</section>
<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()-2)">
<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">
<section class="sect1"><xsl:value-of select="./heading"/>
</section>
<xsl:for-each select="./para">
<div class="ital">
<xsl:apply-templates select="node()[not(self::label)]"/></div></xsl:for-each>
</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:value-of select="."/>
</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:for-each select=".">
<xsl:apply-templates select="child::node()[not(self::label)]"/></xsl:for-each>
<xsl:apply-templates select="//counsel.group"/>
</xsl:template>
<xsl:template match="counsel.group" name="j">
<xsl:for-each select=".">
<div class="para-align left">
<xsl:value-of select="counsel.line"/></div>
</xsl:for-each>
<xsl:apply-templates select="//history"/>
</xsl:template>
<xsl:template match="history">
<div class="para-align left">
<xsl:value-of select="./action"/>
<xsl:text>—</xsl:text>
<xsl:for-each select="case.ref.no.group/case.ref.no">
<xsl:value-of select="prefix"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="number" />
<xsl:text>-</xsl:text>
<xsl:value-of select="year" />
<xsl:if test="not(position() = 2)">
<xsl:text> and </xsl:text>
</xsl:if>
</xsl:for-each></div>
</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:otherwise>
<xsl:variable name="fontStyle">
<xsl:value-of select="concat('font-style-',@type)"/>
</xsl:variable>
<span class="{$fontStyle}">
<xsl:apply-templates/>
</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
當我申請到下面的XSLT
<case>
<counsel.group>
<counsel.line>Gan Khong Aik, Tai Foong Lam and Ng Pok Yue (Abdullah Chan) for appellant</counsel.line>
<counsel.line>Lim Siew Ming, Ong Yu Jian and Dhanial Ahmad (Raja, Darryl & Loh) for respondents</counsel.line>
</counsel.group>
<case.ref.no.group>
<case.ref.no>
<prefix>Civil Appeal</prefix>
<number>W-02-887</number>
<year>2008</year>
</case.ref.no>
<case.ref.no>
<prefix>Civil Appeal</prefix>
<number>W-02-888</number>
<year>2008</year>
</case.ref.no>
<history>
<action>Appeals from High Court, Kuala Lumpur</action>
<case.ref.no.group>
<case.ref.no>
<prefix>Originating Summon</prefix>
<number>D5(IP)-24-94</number>
<year>2008</year>
</case.ref.no>
<case.ref.no>
<prefix>Originating Motion</prefix>
<number>D5(IP)-25-7</number>
<year>2008</year>
</case.ref.no>
</case.ref.no.group>
</history>
</case.ref.no.group>
<para.group>
<para><list.item>
<label>3.</label>	
<list>
<list.item>
<label>(a)</label>	The High Court judge was correct in his finding that Lian Bee was not a person aggrieved, considering the fact that QAF was the registered proprietor of the registered trade mark for 10 years. Gardenia’s product sales using the registered trade mark had already reached RM50 million before Lian Bee started using the infringing trade mark. Apart from that, Lian Bee had not taken any steps to register the infringing trade mark. [<emphasis type="italic">see p 611 para 47 lines 4-15</emphasis>]</list.item>
<list.item>
<label>(b)</label>	Section 35 of the TMA provides that exclusive rights in relation to the registered trade mark is given to the registered proprietor. It does not provide for any protection or recognition for common law users as contended by Lian Bee. Considering the fact that the registered trade mark was lawfully registered and had been used by the registered user, it was unlikely that the registered trade mark could be a threat to Lian Bee’s commercial activities. On the contrary, it was the infringing trade mark that posed a threat towards Gardenia’s usage of the registered trade mark. [<emphasis type="italic">see p 611 para 48 line 16 - para 49 line 41</emphasis>]</list.item>
</list>
</list.item>
<list.item>
<label>4.</label>	On the facts, QAF was registered as the proprietor of the registered trade mark for 10 years, i.e from 2001 to 2011. By virtue of the licensing agreement between QAF and Gardenia, Gardenia has the right to use the trade mark within the same period. Although the registration was done in 2004, by virtue of s 48(1)(e) of the TMA, it was clear that the period of the permitted use is to be for a period determined by the proprietor of the trade mark. There is nothing in s 46 of the TMA and reg 81(2) of the Trade Marks Regulations 1997 that may be construed to prevent the date of use of a registered trademark from being enforced retrospectively to a date prior to the application for registration. [<emphasis type="italic">see p 612 para 53 line 31 - p 613 para 56 line 26</emphasis>]</list.item>
</para> </para.group></case>
輸出我越來越有一種「甘康元AIK,大欖永豐和Ng學樂(陳阿都拉)對上訴人的複製和下一行「,因爲我希望它在第四點之後也只出現一次。即結束。請讓我知道如何實現這一點。
感謝
嗨@akash感謝您的回覆,但這並沒有奏效。 :-( – user2423959
我的建議改變了什麼? –
nop,它是這樣的:-( – user2423959