Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

number

Referencia de XSLT y XPath: Elementos XSLT, Funciones EXSLT, <ahref=" docs="" es="" funciones"="" xpath="">XPath:Funciones, XPath:Ejes </ahref=">

El elemento <xsl:number> hace conteos secuenciales. También puede ser usado para darle formato a los números.

Sintaxis

<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  />

Atributos requeridos

Ninguno.

Atributos opcionales

count
Indica que es lo que debe ser numerado de manera secuencial. Usa una expresión XPath.
level
Define cuantos niveles del documento deben ser tomados en cuenta para generar la secuencia numérica. Tiene 3 valores permitidos: single, multiple, y any. El valor por preestablecido es single:
single
Numera los nodos hermanos de manera secuencia, como en los listados. ... CONTINUAR DESDE AQUÍ...
Numbers sibling nodes sequentially, as in the items in a list. The processor goes to the first node in the 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
Numbers nodes as a composite sequence that reflects the hierarchic position of the node, e.g. 1.2.2.5. (The nested format can be specified with the 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.)
Numbers all matching nodes, regardless of level, sequentially. The 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
Specifies where the numbering should start or start over. The sequence begins with the first descendant of the node that matches the from attribute.
value
Applies a given format to a number. This is a quick way to format a user-supplied number (as opposed to a node sequence number) in any of the standard <xsl:number> formats.
format
Defines the format of the generated number:
format="1"
<tt>1 2 3 . . .</tt> (This is the only format supported at this time)
format="01"
<tt>01 02 03 . . . 09 10 11 . . .</tt>
format="a"
<tt>a b c . . .y z aa ab . . .</tt>
format="A"
<tt>A B C . . . Y Z AA AB . . .</tt>
format="i"
<tt>i ii iii iv v . . .</tt>
format="I"
<tt>I II III IV V . . .</tt>
lang (Not supported at this time.)
Specifies which language's alphabet should be used in letter-based numbering formats.
letter-value
Disambiguates between numbering sequences that use letters. Some languages have more than one numbering system that use letters. If both systems begin with the same token, ambiguity can arise. This attribute can have the value "alphabetic" or "traditional". The default is "alphabetic".
grouping-separator
Specifies what character should be used as the group (e.g. thousands) separator. The default is the comma (,).
grouping-size
Indicates the number of digits that make up a numeric group. The default value is "3".

Type

Instruction, appears within a template.

Defined

XSLT, section 7.7

Gecko support

Partial support. See comments above.

Etiquetas y colaboradores del documento

 Colaboradores en esta página: Mgjbot, ErickCastellanos
 Última actualización por: Mgjbot,