Subject: [xsl] XQuery alternative ⁓ map | XSLT 2.0 || 3.0 From: "Fiona Chen anonymousjuly1@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 10 Jul 2021 13:17:19 -0000 |
B B B B Stage four execution: let $m := c:mM($c) let $h := c:style($t, $c) => c:hM() return let $b := <b> B B B <m>{ $m - $h }</m> B B B <h>{ $h - $m }</h> B B B <e> B B B B B B B { B B B B B B B B let $e := <e>{ $m + $h }</e> B B B B B B B for $r in $e//*:map/*:entry[count(*:value) gt 1] B B B B B B B return B B B B B B B <r> B B B B B B B B B B B <id>{ $r/@key }</id> B B B B B B B B B B B { B B B B B B B B B B B ( B B B B B B B B B B B if (map:get($m, $r/@key) eq map:get($e, $r/@key)) then B B B B B B B B B B B <mE>{ map:get($m, $r/@key) }</mE> B B B B B B B B B B B else (), B B B B B B B B B B B if (map:get($h, $r/@key) eq map:get($e, $r/@key)) then B B B B B B B B B B B <hE>{ map:get($h, $r/@key) }</hE> B B B B B B B B B B B else () B B B B B B B B B B B ) B B B B B B B B B B B } B B B B B B B </r> B B B B B B B } B B B B </e> </b> return B B B xslt-invoke("b.xsl", $b) B B during which produces below in-memory $b. <b> B B B <m> B B B B B B B <map:map> B B B B B B B B B B B <map:entry key="/d.xml"> B B B B B B B B B B B B B B B <map:value>FA</map:value> B B B B B B B B B B B </map:entry> B B B B B B B </map:map> B B B </m> B B B <h> B B B B B B B <map:map> B B B B B B B B B B B <map:entry key="/d.xml"> B B B B B B B B B B B B B B B <map:value>FE</map:value> B B B B B B B B B B B </map:entry> B B B B B B B </map:map> B B B </h> B B B <e> B B B B B B B <r> B B B B B B B B B B B <id>/d.xml</id> B B B B B B B B B B B <mE>FA</mE> B B B B B B B B B B B <hE>FE</hE> B B B B B B B </r> B B B </e> </b> B B B B I then transform the resulted $b with XSLT ( <m>, <h> and <e> is in different format). B B B The dynamic transformation of <m>, <h> and <e>B 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?? B B B B The logic of the XQY is: B <m>B (mechanic model) is the sequence of difference of keys (<id>) in $m while not present in $hM map. <h> (heuristics classification) vice versa. B <e> is the sequence of bias error (<mE> has the upper hand over <hE>), in essence, match & merge in a map. B B B Even better, if this can be done in XSLT way.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Do you use Knuth's algori, Michael Kay mike@xxx | Thread | [xsl] How to dynamically evaluate a, Roger L Costello cos |
Re: [xsl] Do you use Knuth's algori, Michael Kay mike@xxx | Date | Re: [xsl] Got an XSLT function that, Mukul Gandhi mukulg@ |
Month |