Stage four execution:
let $m := c:mM($c)
let $h := c:style($t, $c) => c:hM()
return
let $b :=
<b>
<m>{ $m - $h }</m>
<h>{ $h - $m }</h>
<e>
{
let $e := <e>{ $m + $h }</e>
for $r in $e//*:map/*:entry[count(*:value) gt 1]
return
<r>
<id>{ $r/@key }</id>
{
(
if (map:get($m, $r/@key) eq map:get($e, $r/@key)) then
<mE>{ map:get($m, $r/@key) }</mE>
else (),
if (map:get($h, $r/@key) eq map:get($e, $r/@key)) then
<hE>{ map:get($h, $r/@key) }</hE>
else ()
)
}
</r>
}
</e>
</b>
return
xslt-invoke("b.xsl", $b)
during which produces below in-memory $b.
<b>
<m>
<map:map>
<map:entry key="/d.xml">
<map:value>FA</map:value>
</map:entry>
</map:map>
</m>
<h>
<map:map>
<map:entry key="/d.xml">
<map:value>FE</map:value>
</map:entry>
</map:map>
</h>
<e>
<r>
<id>/d.xml</id>
<mE>FA</mE>
<hE>FE</hE>
</r>
</e>
</b>
I then transform the resulted $b with XSLT ( <m>, <h> and <e> is in
different format).
The dynamic transformation of <m>, <h> and <e> in XQuery becomes
cumbersome. How realistic is that I can have XSL equivalent (the
matching/binding aspects before xslt-invoke modules)? I can pass the map node
one-at-a-time to the XSLT processor. Can two map nodes be called each other in
XSLT??
The logic of the XQY is:
<m> (mechanic model) is the sequence of difference of keys (<id>) in $m while
not present in $hM map. <h> (heuristics classification) vice versa. <e> is
the sequence of bias error (<mE> has the upper hand over <hE>), in essence,
match & merge in a map.
Even better, if this can be done in XSLT way.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--