From: Areki, A. <aa...@ri...> - 2011-11-18 14:47:29
|
Hi all, Recalling my last post does any one check/verify why it is working in 1.4.0 but not in 1.4.2? VERSION 1.4.0 VS VERSION 1.4.2 For the following xQuery code path expression it works with version 1.4.0 but not with 1.4.2 for $program in doc("studyAbroad/studyAbroadPrograms.xml")//program[program_ID = $id] The fix we come out to make it work on both version (1.4.0 and 1.4.2) is for $program in doc("/db/studyAbroad/studyAbroadPrograms.xml")//program[program_ID = $id] Sample studyAbroadPrograms.xml for the above query is <programs displaydate="2011-04-07T13:28:19> <recordcount> 100</recordcount> <program> <program_ID>145</program_ID> <program_city>New Yourk</program_city> </program> <program> <program_ID>183</program_ID> <program_city>San Diego</program_city> </program> </article> VERSION 1.4.2 VS VERSION 1.5.0 Another xQuery path expression that works in version 1.4.2 but not in 1.5.0 is let $grp-ft := $query/grp-ft/node() let $hits := if ($grp-ft) then $hits//displayGroup[ft:query(@grpname, $grp-ft)] else $hits The fix to make it work on both version (1.4.2 and 1.5.0) is let $grp-ft := $query/grp-ft/node() let $hits := if ($grp-ft) then $hits[ft:query(displayGroups//@grpname, $grp-ft)] else $hits Sample xml for the above query is <article displaydate="2011-04-07T13:28:19> <title> chemistry major</title> <displayGroups> <displayGroup grpname="advising" grpstartdate="2010-05-06T00:00:00Z" grpenddate=""/> <displayGroup grpname="as" grpstartdate="2010-04-07T00:00:00Z" grpenddate=""/> </displayGroups> </article> Thanks for your help Alem Areki (UR) |