Looks like XMLPrinter isn't (properly) escaping your embedded XML.
Thanks for the report.
On Oct 1, 2010, at 12:10 PM, Nguyen, Son 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\
lt;Values version=\2.0\gt;
lt;value name=\xml\gt;set in cell lt;/valuegt;
lt;/Valuesgt;
/value
/xmlDoc
))
(reset)
(run)
The ouput for the clp run:
?xml version=1.0 encoding=UTF-8?
xmlDoc version=1.0
value name=data
lt;Values version=2.0gt;
lt;value name=xmlgt;set in cell lt;/valuegt;
lt;/Valuesgt;
/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=xmlset in cell /value
/Values
/value
/xmlDoc
-
Ernest Friedman-Hill
Informatics Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.