Hi Lahiru,

Can you try the following in your XSLT

<xsl:processing-instruction name="xml-multiple">
<xsl:text>tokens</xsl:text>
</xsl:processing-instruction>

Regards
Senduran

On Thu, Mar 15, 2018 at 3:40 AM, Lahiru Sandaruwan <[email protected]> wrote:

> Devs,
>
> I'm trying $subject using ESB 4.8.1 and I can only set the payload from
> XSLT. Let me explain an example below.
>
> I'm expecting the JSON result as,
> *{*
> * "name": "lahiru",*
> * "tokens": []*
> *}*
>
> Tried setting following from XSLT,
> *...*
>
> *<xsl:value-of select="firstName"/>*
> *<xsl:processing-instruction name="xml-multiple"/>*
> *<tokens xmlns=""/>*
> *...*
>
> It outputs XML,
>
> *<jsonElement>*
>
> *<name>lahiru</name>*
>
> *<?xml-multiple ?>*
> *<mynode/>*
>
> *</jsonElement>*
>
> And it is converted to following which is not the disired,
> *{*
> * "name": "lahiru",*
> * "tokens": [*
>
> *""*
>
> *]*
>
> *}*
>
> If I could set XML node as *<?xml-multiple tokens?>* from XSLT, it would
> work. But it seems there is no way to set such node.
>
> Any idea on how I can get this done?
>
> Thanks.
>
> --
> --
>
> Lahiru Sandaruwan
> WSO2 Inc., http://wso2.com
>
> lean.enterprise.middleware
>
> m: +1 901 530 2379 <+1%20901-530-2379>
> e: [email protected] b: https://medium.com/@lahirugmg
> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to