--- title: position slug: Web/XPath/Functions/position tags: - XSLT_Reference translation_of: Web/XPath/Functions/position ---
{{ XsltRef() }}
position
함수는 식 평가 문맥(expression evaluation context)와 위치가 같은 숫자를 반환합니다.
position()
식 평가 문맥과 위치가 같은 정수.
<xsl:template match="//a[position() = 5"> <!-- 이 템플릿은 문서 안 다섯 번째 a 요소와 일치합니다. --> </xsl:template>
<xsl:template match="//div[@class='foo']/bar[position() = 1]"> <!-- 이 템플릿은 class 속성이 "foo"이고 div 요소의 자식인 첫 번째 bar 요소와 일치합니다 --> </xsl:template>
지원함.