ok, well I have to agree with Alan’s problem…I wouldn’t have found this to perform a case-insensitive search either. Even after reading it through, I’d be hard-pressed to know that was what this collation?strength was for.
Be that as may, I’m not sure if I’ve understood the suggestion - if I try the two forms on my Tamino 4.4 database, I get completely different results:
declare default collation "collation?strength=secondary"
for $r in input()/Role
where $r/@RoleName = "purchasing agent"
return $r
retrieves the expected single document
<Role MDR_JobFunction="002" RoleID="1" RoleName="Purchasing Agent"/>
but
for $r in input()/Role
where compare($r/@RoleName, "purchasing agent","collation?strength=secondary")
return $r
retrieves a set of documents that don’t match my selection, such as
<Role MDR_JobFunction="205" RoleID="2" RoleName="Middle/Junior High Princi"/>
<Role MDR_JobFunction="301" RoleID="3" RoleName="Math Dept Chairperson"/>
<Role MDR_JobFunction="321" RoleID="4" RoleName="Science Dept Chairperson"/>
am I using the compare function in the second example incorrectly?
#Tamino#API-Management#webMethods