Implementing Finite State Engine in XSLT
Think about the parameters needed to enter a state
str
: string still to be parsed
max
: number of numbers required
pos
: position in set of number currently being worked upon
sofar
: the characters recognised
so far
as belonging to this number
Process starts by entering state 1 with:
str
: set to attribute d
max
: set to attribute num
pos
: set to 1
sofar
: set to empty