|
From: | shn |
Subject: | [Qexo-general] join pattern match |
Date: | Wed, 30 Apr 2003 01:06:10 -0400 |
Hi all,
New to xml and qexo so forgive me if this seems
trivial. I'm using kawa-1.6.99.jar
I am joining names and ran across some strange
behavior with initials. It seems like the '.' is a wilcard but even as such
isn't predictable? The data, xql and results follow. Any feedback would be
appreciated.
Is there another operator that would perform a
strict match, or a way to escape any wildcards? Where should I be looking for
info on wildcards, operators, ...
Thanks,
Kevin
gate1:/var/www/xml>cat
test4a.xml
<team> <player>H. World</player> <player>A.J. Foo</player> <player>H.J. Bar</player> </team> gate1:/var/www/xml>cat test4b.xml <team> <player>Andruw Jones</player> <player>Hndruw jack</player> <player>Hello World</player> </team> gate1:/var/www/xml>cat
test4.xql
{-- test4.xql - join without wildcard matches --} define function make-page($t1,$t2) {
for $t in $t1/player for $tt in $t2/player let $tn:=$t/node(), $ttn:=$tt/node() return if ($tn = $ttn) then (( <match>{$tn} : {$ttn}</match> ), " " ) else (( <nomatch>{$tn} : {$ttn}</nomatch> ), " " ) } let $t1 :=
document("test4a.xml")/team,
$t2 := document("test4b.xml")/team return make-page($t1,$t2) gate1:/var/www/xml>./do4
(compiling test4.xql) <nomatch>H. World : Andruw Jones</nomatch> <match>H. World : Hndruw jack</match> <nomatch>H. World : Hello World</nomatch> <match>A.J. Foo : Andruw Jones</match> <nomatch>A.J. Foo : Hndruw jack</nomatch> <nomatch>A.J. Foo : Hello World</nomatch> <nomatch>H.J. Bar : Andruw Jones</nomatch> <match>H.J. Bar : Hndruw jack</match> <nomatch>H.J. Bar : Hello World</nomatch> |
[Prev in Thread] | Current Thread | [Next in Thread] |