title: Stringify jsonx object nested within url-open tag
body: <p>I'm using ibm datapower to send a post request to an api. I'm using the url-open tag to send the post but I'm having trouble with the json payload. Ideally I'd like to do something like this:</p>
  
  <pre><code>&lt;xsl:stylesheet xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx" version="1.0"&gt;
    &lt;dp:url-open target="{$url}"&gt;
      &lt;json:object&gt;
        &lt;json:string name="key"&gt;value&lt;/json:string&gt;
      &lt;/json:object&gt;
    &lt;/dp:url-open&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>but if I do it like this I'm getting an illegal char '{' error as the json isn't being stringified. If I do:</p>
  
  <pre><code>&lt;xsl:variable name="payload"&gt;{"key": "value"}&lt;/xsl:variable&gt;
  &lt;dp:url-open target="{$url}"&gt;
      &lt;xsl:value-of select="$payload" /&gt;
  &lt;/dp:url-open&gt;
  </code></pre>
  
  <p>It works as expected but it's not very dynamic as I have to hardcode the stringified object. Is there a way to create the json object as per the first example and then stringify before sending the request?</p>
  
  <p>Any ideas greatly appreciated</p>
  
  <p>C</p>