XdmValue objects returned from applyTemplates()
Alan Painter <[email protected]> Wed, 14 Jul 2021 10:07:42 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAN+GtW0McaJUKbofVO4e+CyobG9ajsn1QcYE0p0W=ge8=f2j9Q@mail.gmail.com> |
--===============7291325924873979655== Content-Type: multipart/alternative; boundary="000000000000c44d7505c710d9d7" --000000000000c44d7505c710d9d7 Content-Type: text/plain; charset="UTF-8" Hi fellow Saxon enthusiasts, I'm wanting to pass around XdmValue objects within a loosely coupled network of Xslt30Transformer instances using the XdmValue output of one transformation (e.g. from applyTemplates()) as the input to other transformations (for example, as the source or as stylesheet parameters). I understand that in order for one Xslt30Transformer to accept an XdmValue, the XdmValue needs to have been created by another Xslt30Transformer that was instantiated using the same Processor or Configuration. It's not necessarily convenient to arrange for all Xslt30Transformer instances in this loosely-coupled network to use the same Processor. I'm wondering about two different approaches: 1) Would it be possible to convert an XdmValue to a new Processor? (If I understand correctly, the XdmValue inherits the mapping of namespaces from its origin processor, so this could be a matter of re-mapping those namespaces to a new target Processor.). I realize that re-serializing the XdmValue to JSON or XML would achieve this for those document types, but I'm wanting to pass around general XDM and not be constrained to strict JSON/XML as intermediary values. 2) In the event that (1) is not possible, I'm wondering what the drawbacks would be for re-using a same Processor by a (potentially) large number of Xslt30Transformers in parallel. Thanks in advance for any help or pointers -alan --000000000000c44d7505c710d9d7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi fellow Saxon enthusiasts,<div><br></div><div>I'm wa= nting to pass around XdmValue objects within a loosely coupled network of X= slt30Transformer=C2=A0instances using the XdmValue output of one transforma= tion (e.g. from applyTemplates()) as the input to other transformations=C2= =A0(for example, as the source or as stylesheet parameters).</div><div><br>= </div><div>I understand that in order for one Xslt30Transformer=C2=A0to acc= ept an XdmValue, the XdmValue needs to have been created by another Xslt30T= ransformer that was instantiated using the same Processor or Configuration.= </div><div><br></div><div>It's not necessarily=C2=A0convenient to arran= ge for all Xslt30Transformer instances in this loosely-coupled network to u= se the same Processor.</div><div><br></div><div>I'm wondering about two= different approaches:</div><div><br></div><div>1) Would it be possible to = convert=C2=A0an XdmValue to a new Processor?=C2=A0 (If I understand correct= ly, the XdmValue inherits the mapping of namespaces from its origin process= or, so this could be a matter of re-mapping those namespaces to a new targe= t Processor.). I realize that re-serializing the XdmValue to JSON or XML wo= uld achieve this for those document types, but I'm wanting to pass arou= nd general XDM and not be constrained to strict JSON/XML as intermediary va= lues.</div><div><br></div><div>2) In the event that (1) is not possible, I&= #39;m wondering what the drawbacks would be for re-using a same Processor b= y a (potentially) large number of Xslt30Transformers in parallel.=C2=A0=C2= =A0</div><div><br></div><div>Thanks in advance for any help or pointers</di= v><div><br></div><div>-alan</div><div><br></div><div><br></div><div><br></d= iv></div> --000000000000c44d7505c710d9d7-- --===============7291325924873979655== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============7291325924873979655== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help --===============7291325924873979655==--