Return type: Integer
Returns:        Number of consecutive elements with the same declaration.

occurrence element-qualifier?


Returns the number of consecutive elements that have the same declaration as the current element. If occurrence is followed by an element qualifier, the specified element is tested instead of the current one.

Inclusions are counted as well as proper elements.

The following element events will always have an occurrence of 1:

  • the first element in a markup stream
  • the first child element
  • any element not of the same element declaration as its previous sibling
  • an element that immediately follows data content.