Xslt-foreach
提供:Dev Guides
XSLT <for-each>
<xsl:for-each>タグは、各ノードにテンプレートを繰り返し適用します。
宣言
以下は <xsl:for-each> 要素の構文宣言です
属性
Sr.No | Name & Description |
---|---|
1 |
Select 反復されるノードのセットを決定するために現在のコンテキストで評価されるXPath式。 |
要素
Number of Occurrences | Unlimited |
---|---|
Parent elements | xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:fallback, xsl:foreach, xsl:if, xsl:message, xsl:otherwise, xsl:param, xsl:processinginstruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements. |
Child elements | xsl:apply-imports, xsl:apply-templates, xsl:attribute, xsl:call-template, xsl:choose, xsl:comment, xsl:copy, xsl:copy-of, xsl:element, xsl:fallback, xsl:for-each, xsl:if, xsl:message, xsl:number, xsl:processing-instruction, xsl:sort, xsl:text, xsl:value-of, xsl:variable. |
デモ例
この例では、各生徒を反復処理することにより、属性rollnoとその子<firstname>、<lastname> <nickname>および<marks>を持つ<student>要素のテーブルを作成します。