## [saxon] function: sequence()

 [saxon] function: sequence() From: Memey - 2004-06-25 14:40:50 ```Hi, Just a small question. Is there a function that's concerned about sequence of nodes in Saxon? Like one which returns the orders of nodes. For instance, assume a sequence "AAABBBCCCDDD" Then the function can return something like: AAA => 1; BBB => 2; CCC => 3; DDD => 4; If so, how can it be invoked in Saxon? Thank you so much in advance for any help. Cheers, W.Jirapanthong Capital One Classic Mastercard 60 second response online. http://mocda.com/1/c/681064/117934/307081/307081 AOL users go here http://mocda.com/1/c/681064/117934/307081/307081 ```

 [saxon] function: sequence() From: Memey - 2004-06-25 14:40:50 ```Hi, Just a small question. Is there a function that's concerned about sequence of nodes in Saxon? Like one which returns the orders of nodes. For instance, assume a sequence "AAABBBCCCDDD" Then the function can return something like: AAA => 1; BBB => 2; CCC => 3; DDD => 4; If so, how can it be invoked in Saxon? Thank you so much in advance for any help. Cheers, W.Jirapanthong Capital One Classic Mastercard 60 second response online. http://mocda.com/1/c/681064/117934/307081/307081 AOL users go here http://mocda.com/1/c/681064/117934/307081/307081 ```
 RE: [saxon] function: sequence() From: Michael Kay - 2004-06-25 19:18:17 ```Appendix C.3 of the Functions and Operators spec shows how to write this as a user-written function: XSLT implementation XQuery implementation declare function eg:index-of-node(\$sequence as node()*, \$srch as node()) as xs:integer* { for \$n at \$i in \$sequence where (\$n is \$srch) return \$i } Regards, Michael Kay > -----Original Message----- > From: saxon-help-admin@... > [mailto:saxon-help-admin@...] On Behalf Of Memey > Sent: 25 June 2004 15:41 > To: saxon-help@... > Subject: [saxon] function: sequence() > > Hi, > > Just a small question. Is there a function that's concerned > about sequence of > nodes in Saxon? Like one which returns the orders of nodes. > > For instance, assume a sequence > "AAABBBCCCDDD" > > Then the function can return something like: > > AAA => 1; > BBB => 2; > CCC => 3; > DDD => 4; > > If so, how can it be invoked in Saxon? > > Thank you so much in advance for any help. > > > Cheers, > W.Jirapanthong > > Capital One Classic > Mastercard > 60 second > response online. http://mocda.com/1/c/681064/117934/307081/307081 > > AOL users go here > http://mocda.com/1/c/681064/117934/307081/307081 > > ```