Re: Is there any easy way to provide XdmValue as a source for the standard XsltTransformer?
Alan Painter <[email protected]> Sun, 27 Jun 2021 22:03:05 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAN+GtW0VoQbeSJe7xLnye0teNunA_Z70QNdTh-V8TY8t7xd8=A@mail.gmail.com> |
Hi Michael, In fact, that's the objective of this exercise, to avoid deserializing/reserializing from XdmValues that are the source/results of cascading transformations orchestrated within Spring Integration. Spring Integration has a message payload that is passed around within it. I am shooting for an XdmValue message payload that can be transformed without serialization. This may well mean that I must forego the XsltTransformer for the Xslt30Transformer, but I was hoping that there could be a simpler solution since there is already a lot of implementation dependency on XsltTransformer. thanks for your help and best regards -alan On Sun, Jun 27, 2021 at 9:25 PM Michael Kay <[email protected]> wrote: > If the XdmValue represents an XML node, then it will (probably) be an > XdmNode, and the NodeInfo can be obtained using > XdmNode.getUnderlyingValue(). > > However, if the XdmValue is an XdmMap or XdmArray (representing a JSON > input), then the XsltTransformer isn't really set up for this. You would > probably want to pass it in as a string-valued parameter and parse it from > within the stylesheet. > > Michael Kay > Saxonica > > > On 27 Jun 2021, at 16:48, Alan Painter <[email protected]> wrote: > > > > Hello fellow XML knowledge workers, > > > > I'm trying to reuse the implementations in Spring Integration that do > XSLT transformations using the XsltTransformer. > > > > I'd like to be able to pass an XdmValue as a source for transformations > so that the source could be JSON or XML, writing output to a RawDestination > or XdmDestination. I understand that this is possible using > Xslt30Transformer, but since the tooling that I'd like to reuse is based > upon the older XsltTransformer, I'm a bit stuck. > > > > I see that it's possible to provide a NodeInfo source value. Could it > be relatively easy to have an XdmValue presented as NodeInfo? > > > > thanks for any pointers and best regards > > > > -alan > > > > _______________________________________________ > > saxon-help mailing list archived at http://saxon.markmail.org/ > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/saxon-help > > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help > _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help