Data processing with XQuery

I have XML where:
<class name ="Computer @start>
and it’s no problem to retrieve this data using XQuery but is it possible to process that data more for I need to get something like this:

Other words if I find @start, I need to split this data in the attribute. Is it possible to do with XQuery and if yes how?
Appreciate, with regards Dalius.

If the attribute value is simply two tokens separated by a space, you can split it up very easily using the functions substring-before() and substring-after(). You can test whether the value contains “@start” using the contains() function.

If you need to do more elaborate string-processing there are regular-expression functions like matches() and tokenize() - but not yet in all implementations!

Michael Kay

Thanks a lot, Michael. It looks like your sugestions will help me solve my problems. I didn’t have time yet to see if it works, but I’m planning on doing it tonight so if I’ll have further questions I will post them.
Big thanks again for your response to my question.