Xslt XSL:多级编号
我是xsl新手 这是样式表模板Xslt XSL:多级编号,xslt,Xslt,我是xsl新手 这是样式表模板 <xsl:template match="LI|li"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block> <xsl:choose> <xsl:when test="name(..)!='
<xsl:template match="LI|li">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<xsl:choose>
<xsl:when test="name(..)!='OL'">
<xsl:number format="1."/>
</xsl:when>
<xsl:when test="name(../..)!='OL'">
<xsl:number format="(a)"/>
</xsl:when>
<xsl:when test="name(../../..)!='OL'">
<xsl:number format="(1)"/>
</xsl:when>
<xsl:when test="name(../../../..)!='OL'">
<xsl:number format="(i)"/>
</xsl:when>
<xsl:when test="name(../../../../..)!='OL'">
<xsl:number format="(A)"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>·</xsl:text>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:template>
<xsl:template match="SectionsArticlesToPrintVOExRow" mode="terms">
<xsl:choose>
<xsl:when test="AmendOperationCode='DELETED'">
</xsl:when>
<xsl:otherwise>
<fo:block padding-top="12pt" font-size="{$HeaderFontSize}" font-family="Times" id="S{UniqueId}" font-weight="bold">
<xsl:if test="Label and (Label!='')">
<xsl:value-of select="Label"/>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:value-of select="Title"/>
</fo:block>
<fo:block/>
<xsl:if test="ObjectType='ARTICLE'">
<fo:block font-size="9pt" padding-top="5pt" padding-bottom="5pt" font-family="Times" white-space-collapse="false" linefeed-treatment="preserve" text-align="justify">
<xsl:choose>
<xsl:when test="InsertByReference='Y'">
<xsl:apply-templates select="ReferenceText"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="ArticleText"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
本产品仅使用东芝品牌的耗材。主FSM中包含的所有耗材将
由东芝服务提供商提供,无需向客户收取额外运费。消耗品
本主FSM未涵盖的内容包括:
1. MFDs - paper and staples, unless otherwise indicated herein.
2. Stand-Alone Facsimiles Process kit, toner, drum, ink film and developer kit are excluded.
2.4.1. MFDs - paper and staples, unless otherwise indicated herein.
2.4.2. Stand-Alone Facsimiles Process kit, toner, drum, ink film and developer kit are excluded.
排除在外的供应品可从其他供应商或服务提供商处购买。如果其他供应商不是东芝
使用品牌用品,除纸张外,东芝的维护将无效,客户将放弃
东芝制造商保修项下的某些权利。服务提供商将为排除在外的供应品单独计费
不包括在内。史泰博和传真用品可通过发布采购订单从东芝单独购买
但是期望的输出:
2.4. Consumables
本产品仅使用东芝品牌的耗材。主FSM中包含的所有耗材将
由东芝服务提供商提供,无需向客户收取额外运费。消耗品
本主FSM未涵盖的内容包括:
1. MFDs - paper and staples, unless otherwise indicated herein.
2. Stand-Alone Facsimiles Process kit, toner, drum, ink film and developer kit are excluded.
2.4.1. MFDs - paper and staples, unless otherwise indicated herein.
2.4.2. Stand-Alone Facsimiles Process kit, toner, drum, ink film and developer kit are excluded.
排除在外的供应品可从其他供应商或服务提供商处购买。如果其他供应商不是东芝
使用品牌用品,除纸张外,东芝的维护将无效,客户将放弃
东芝制造商保修项下的某些权利。服务提供商将为排除在外的供应品单独计费
不包括在内。史泰博和传真用品可通过发布采购订单从东芝单独购买
我如何才能达到所需的输出
更新。在xsl:number上使用level=“multiple”选项,例如
<xsl:number level="multiple" format="1.1.1"/>
如果您发布一些示例输入,将更容易理解您需要什么。我更新了一些更多信息。请告诉我您需要了解更多信息。@KRaju请发布足够的代码来重现问题-包括您正在使用的XML输入示例。请参阅:使用示例xml更新。谢谢。我已经整理了你的代码,使它更可读。您的示例输入似乎不是有效的XML(
和
标记不匹配)。在希望获得合理的输出之前,您必须修正您的输入。