Using collation in Schema


I need to apply a collation to the Schema of Tamino. I’ve got the desired sort within a XQuery but not changing the Schema.

This is the query:

for $a in input()/Lema
order by $a/cont ascending collation “collation?language=ca”
return $a/cont/text()

and the desired result:



as described in the documentation:
XQuery does not care for the collation defined in the schema - you have to specify the collation in the query. However, you can specify the collcation by retrieving it from the schema, see tf:getCollation()



Hi Harald,

It means that for each XQuery in my application I need to add the collation parameter, doesn’t it?

Is there any way to define the collation for the entire database/Schema in order to avoid the collation for each XQuery?

Thanks again.