--- title: number slug: Web/XSLT/Element/number tags: - Todas_las_Categorías - XSLT translation_of: Web/XSLT/Element/number original_slug: Web/XSLT/number ---
{{XsltRef}}
El elemento <xsl:number>
hace conteos secuenciales. También puede ser usado para darle formato a los números.
<xsl:number count=EXPRESION level="single" | "multiple" | "any" from=EXPRESION value=EXPRESION format=FORMAT-STRING lang=XML:LANG-CODE letter-value="alphabetic" | "traditional" grouping-separator=CARACTER grouping-size=NUMERO />
Ninguno.
count
level
single
, multiple
, y any
. El valor por preestablecido es single
:single
ancestor-or-self
axis that matches the count
attribute and then counts that node plus all its preceding siblings (stopping when it reaches a match to the from
attribute, if there is one) that also match the count
attribute.If no match is found, the sequence will be an empty list.multiple
format
attribute, e.g. A.1.1). The processor looks at all ancestors
of the current node and the current node itself, stopping when it reaches a match for the from
attribute, if there is one. For each node in this list that matches the count
attribute, the processor counts how many preceding matching siblings it has, and adds one for the node itself. If no match is found, the sequence will be an empty list.any
(Not supported at this time.)ancestor
, self
, and preceding
axes are all considered. The processor starts at the current node and proceeds in reverse document order, stopping if it reaches a match to any from
attribute. If no match to the count
attribute is found, the sequence will be an empty list. This level is not supported at this time.from
attribute.<xsl:number>
formats.alphabetic
" or "traditional
". The default is "alphabetic
".,
).3
".Instruction, appears within a template.
XSLT, section 7.7
Partial support. See comments above.