Hi Lak,
ProductionYear is of type xs:gYear. For this reason, you cannot simply compare it to an integer. XQuery offers two choices to resolve the situation: either construct a comparison value of type xs:gYear (using xs:gYear(1800)) or cast the ProductionYear to integer. Unfortunately, the casting function xs:gYear will be available in Tamino V4.2 only, thus, only the second choice remains for you. The following query should do the job:
declare namespace xs=“XML Schema”
for $b in input()/WineMaking/Vintage
where xs:integer(string($b/ProductionYear)) > 1900
return $b/Quality
Note that XQuery does not support a direct cast from xs:gYear to xs:integer. This is why the string function has to be applied first.
Regards
Harald
#Tamino#API-Management#webMethods