Perhaps using the alternative CDATA representation is possible?
<value name="data"><![CDATA
<Values version="2.0">
<value name="xml">set in cell </value>
</Values>
]]></value>
-W
On 1 October 2010 18:10, Nguyen, Son <[email protected]> wrote:
>
> Hi
>
> I ran into an issue with String having embedded XML content.
> Jess clp and JessML behave differently.
>
> I have a clp function that prints out the String parameter.
> I use the Jess XMLPrinter to transform the clp file into JessML.
>
> They yield different results. In the clp case, the string is properly
> handled, that is untouched.
> Well, at least I think it is. In the JessML case, the string is
> 'interpreted' and the escaped XML becomes real XML.
>
> Any feedback is greatly appreciated.
>
> Son Nguyen
>
> Here is the clp:
>
> (deffunction aaa (?string)
> (printout t "This is what I got" crlf ?string))
>
> (defrule rule1
> =>
> (aaa "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
> <xmlDoc version=\"1.0\">
> <value name=\"data\">
>
> <Values version=\"2.0\">
> <value name=\"xml\">set in cell </value>
> </Values>
>
> </value>
> </xmlDoc>
> "))
>
> (reset)
> (run)
>
>
> The ouput for the clp run:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmlDoc version="1.0">
> <value name="data">
>
> <Values version="2.0">
> <value name="xml">set in cell </value>
> </Values>
>
> </value>
> </xmlDoc
>
> The output for the JessML run:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmlDoc version="1.0">
> <value name="data">
>
> <Values version="2.0">
> <value name="xml">set in cell </value>
> </Values>
>
> </value>
> </xmlDoc>
>
>
>