[XQuery]Is it possible to put "order by" in xquery

Hi,

I would like to have my result in alphabetic order and I put “order by” in the xquery expression (Xquery 4 in Tamino), like this:

with order by


declare namespace tf='http://namespaces.softwareag.com/tamino/TaminoFunction'
for $Person in input()/Person
where tf:containsText($Person/Name, '*Willi*')
order by ($Person/Name)
return <result>{$Person/Name}</result>

When I execute this query I have en error message.

whithout order by, the query works very well!

Is Someone can help me!
Thank you for your help

C

In tamino 4.2, it is sort by, not oreder by (older version of XQuery), e.g.

declare namespace tf=‘http://namespaces.softwareag.com/tamino/TaminoFunction’ for $Person in input()/Person sort
by ($Person/Name) where tf:containsText($Person/Name, ‘Willi’) return $Person/Name