Using collation in Schema

Hi,

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:

  <xq:textNode>cel-la</xq:textNode> 
  <xq:textNode>cella</xq:textNode> 
  <xq:textNode>cel

Hi,

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()

regards

harald

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.