Hi Sanjeev,

Adding ui:format="ui:TEXT" to the <ui:stringify> call should fix that.

By default, stringify assumes HTML as output format, so it turns certain characters into HTML entities such as &trade;. These don’t work in XML.

Now you might think that ui:format="ui:XML" would fix it, but that output format seems to be buggy in recent versions of TBC/EDG.

But as long as you don’t have XML markup in the text that you want to stringify, ui:TEXT should work fine.

Here is the SWP prototype I used to test this:

<ui:group let:attrName="name" let:label="Test&trade;" let:tagName="Continent">
    <ui:bind>
        <ui:stringify ui:format="ui:TEXT" ui:varName="attrStr">{= ?attrName }="{= ?label }"</ui:stringify>
        <ui:parse ui:str="&lt;{= ?tagName } {= ?attrStr }&gt;{= ?label }&lt;/{= ?tagName }&gt;" ui:xml="true"/>
    </ui:bind>
</ui:group>

Also attached as a file. Run by calling this URL:

Richard


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: xml-output-test.ui.ttlx
Description: Binary data




On 12 Feb 2019, at 10:39, Sanjeev Devireddy <[email protected]> wrote:

Hi,
  Using SWP file, I am trying to generate an XML output as shown below. But, since the labels contain special characters (like Reinvention™, Gov’t) so the XML output is not rendered properly. Please check the attachment(test.swp) for the SWP file that I am working with.

Desired Output:
<Auto Generated Inline Image 1.png>

Current Output:
<Auto Generated Inline Image 2.png>

The issue raises only when I use try to add those labels with special characters as the attribute's value of an XML tag. If I add the label(s) with special characters directly as the value(s) of an XML tag then those special characters are rendered properly (please check the below screenshot). So, I think there should be an additional thing to do while using the labels with special characters as the value of an XML tag's attribute, so that the final XML output is rendered properly. Could someone please help?

<Auto Generated Inline Image 3.png>


Thanks,
Sanjeev



--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
<test.swp><Auto Generated Inline Image 1.png><Auto Generated Inline Image 2.png><Auto Generated Inline Image 3.png>

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to