DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Arabic characters in CDATA tag

    Posted Tue February 04, 2020 12:03 PM
    Hi,

    I am facing an issue with Arabic character while constructing a reply message inside CDATA tag. My response message contains some Arabic characters, which is being displayed  in non-arabic format inside CDATA.

    I am using dp:serialize to serialize the data.

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" exclude-result-prefixes="dp" extension-element-prefixes="dp">
    <xsl:output method="xml"/>

    <xsl:template match="/" >

    <xsl:variable name="dataString">
    <dp:serialize select="." omit-xml-decl="yes"/>
    </xsl:variable>

    <v1:reply xmlns:v1="http://schemas.test/xml/">
    <data><xsl:copy-of select="$dataString" /></data>
    </v1:reply>

    </xsl:template>
    </xsl:stylesheet>

    Response:
    <v1:reply xmlns:v1="http://schemas.test/xml/">
    <data><![CDATA[<name>Al Najda St &#1601;&#1585;&#1593; &#1588;&#1575;&#1585;&#1593; &#1575;&#1604;&#1606;&#1580;&#1583;&#1607;</name>]]></data>
    </v1:reply>


    Thanks for the assistance.

    ------------------------------
    Waleed A.
    ------------------------------


  • 2.  RE: Arabic characters in CDATA tag

    Posted Wed February 19, 2020 01:26 AM
    Solved it by setting the Minimum Output Escaping Rule to all in Compile Options Policy inside XML Manager.

    ------------------------------
    Waleed Ahmed
    ------------------------------



  • 3.  RE: Arabic characters in CDATA tag

    Posted Thu February 20, 2020 05:27 PM
    Hi Waleed,

    thanks for posting your solution too. It makes the forum more useful, and also lets us know that you're not still looking for an answer.

    All the best


    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019
    +61 (0) 414 615 334
    ------------------------------