[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XQuery alternative ⁓ map | XSLT 2.0 || 3.0

Subject: 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
 XQuery alternative ⁓ map | XSLT 2.0 || 3.0
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.