亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Verzeichnis suchen
XSLT 基礎(chǔ)教程 XSL 語言 XSLT 簡介 XSLT 瀏覽器 XSLT - 轉(zhuǎn)換 XSLT <xsl:template> 元素 XSLT <xsl:value-of> 元素 XSLT <xsl:for-each> 元素 XSLT <xsl:sort> 元素 XSLT <xsl:if> 元素 XSLT <xsl:choose> 元素 XSLT <xsl:apply-templates> 元素 XSLT - 在客戶端 XSLT - 在服務(wù)器端 XSLT - 編輯 XML XML 編輯器 XSLT 元素參考手冊 XSLT <xsl:apply-imports> 元素 XSLT <xsl:apply-templates> 元素 XSLT <xsl:attribute> 元素 XSLT <xsl:attribute-set> 元素 XSLT <xsl:call-template> 元素 XSLT <xsl:choose> 元素 XSLT <xsl:comment> 元素 XSLT <xsl:copy> 元素 XSLT <xsl:copy-of> 元素 XSLT <xsl:decimal-format> 元素 XSLT <xsl:element> 元素 XSLT <xsl:fallback> 元素 XSLT <xsl:for-each> 元素 XSLT <xsl:if> 元素 XSLT <xsl:import> 元素 XSLT <xsl:include> 元素 XSLT <xsl:key> 元素 XSLT <xsl:message> 元素 XSLT <xsl:namespace-alias> 元素 XSLT <xsl:number> 元素 XSLT <xsl:otherwise> 元素 XSLT <xsl:output> 元素 XSLT <xsl:param> 元素 XSLT <xsl:preserve-space> 和 <xsl:strip-space> 元素 XSLT <xsl:processing-instruction> 元素 XSLT <xsl:sort> 元素 XSLT <xsl:stylesheet> 和 <xsl:transform> 元素 XSLT <xsl:template> 元素 XSLT <xsl:text> 元素 XSLT <xsl:value-of> 元素 XSLT <xsl:value-of> 元素 XSLT <xsl:variable> 元素 XSLT <xsl:when> 元素 XSLT <xsl:with-param> 元素 XSLT 函數(shù) XSLT current() 函數(shù) XSLT document() 函數(shù) XSLT element-available() 函數(shù) XSLT format-number() 函數(shù) XSLT function-available() 函數(shù) XSLT generate-id() 函數(shù) XSLT key() 函數(shù) XSLT system-property() 函數(shù) XSLT unparsed-entity-uri() 函數(shù)
Figuren

XSLT <xsl:number> 元素



定義和用法

<xsl:number> 元素用于測定在源中當(dāng)前節(jié)點的整數(shù)位置。它也用于對數(shù)字進(jìn)行格式化。


語法

<xsl:number
count="expression"
level="single|multiple|any"
from="expression"
value="expression"
format="formatstring"
lang="languagecode"
letter-value="alphabetic|traditional"
grouping-separator="character"
grouping-size="number"/>

屬性

屬性描述
countexpression可選。一個 XPath 表達(dá)式,規(guī)定要計數(shù)的節(jié)點。
levelsingle
multiple
any
可選??刂迫绾畏峙湫蛱?。

可以使用的值:

  • single (默認(rèn))

  • multiple

  • any (Netscape 6 不支持)

fromexpression可選。一個 XPath 表達(dá)式,規(guī)定從何處開始計數(shù)。
valueexpression可選。規(guī)定用戶提供的數(shù)字,用于代替產(chǎn)生的序號。
formatformatstring可選。定義數(shù)字的輸出格式。可以使用的值:
  • format="1" 結(jié)果 1 2 3 . .

  • format="01" 結(jié)果 01 02 03 (Netscape 6 不支持)

  • format="a" 結(jié)果 a b c . . (Netscape 6 不支持)

  • format="A" 結(jié)果 A B C. . (Netscape 6 不支持)

  • format="i" 結(jié)果 i ii iii iv . . (Netscape 6 不支持)

  • format="I" 結(jié)果 I II III IV . . (Netscape 6 不支持)

langlanguagecode可選。規(guī)定用于編號的語言字母表。(Netscape 6 不支持)
letter-valuealphabetic
traditional
可選。規(guī)定選定語言的編號是字母序列("alphabetic")還是其他序列("traditional")。值 "alphabetic" 指定字母序列;值 "traditional" 指定其他序列。默認(rèn)是 "alphabetic"。
grouping-separatorcharacter可選。規(guī)定使用什么字符來分隔組或數(shù)字。默認(rèn)是逗號。
grouping-sizenumber可選。規(guī)定由 grouping-separator 屬性指定的分隔字符分隔的每個分組中的數(shù)字個數(shù)。默認(rèn)是 3。

實例 1

<xsl:number value="250000" grouping-separator="."/>
Output:
250.000

實例 2

<xsl:number value="250000" grouping-size="2"/>
Output:
25,00,00

實例 3

<xsl:number value="12" grouping-size="1"
grouping-separator="#" format="I"/>
Output:
X#I#I

實例 4

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<p>
<xsl:for-each select="catalog/cd">
<xsl:number value="position()" format="1" />
<xsl:value-of select="title" /><br />
</xsl:for-each>
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Vorheriger Artikel: N?chster Artikel: