Re: JESS: Jess clp, JessML and Strings with embedded XML

"Wolfgang Laun" <[email protected]>
Newsgroups gmane.comp.java.jess
Message-ID <15142_1289511195_oABLXE7I015782_AANLkTikSzjCRw=VM3DBkCn=x_Q48xgOXBh95XXWG7BWx@mail.gmail.com>
I think Son Nguyen is right. Even the simple

   (printout t "&gt; &lt; &amp;" crlf)

breaks when converted to XML, printing "> < &"

-W


On 11 November 2010 21:43, Wolfgang Laun <[email protected]> wrote:
> I don't have the sources so I cannot check.
>
> But I think it might break some code not printing XML but plain text
> containing these characters.
>
> Try to convert this .clp to .xml and run both:
> (printout t "less < greater > ampersand &" crlf)
>
> -W
>
>
> On 11 November 2010 21:14, Nguyen, Son <[email protected]> wrote:
>> Hi,
>>
>> I commented out the first three lines of the decodeValue() method in
>> JessSaxHandler.java and things work much better:
>>
>>     private static Value decodeValue(String text, int valueType) throws
>> JessException {
>> //        text = text.replaceAll("&gt;", ">");
>> //        text = text.replaceAll("&lt;", "<");
>> //        text = text.replaceAll("&amp;", "&");
>>
>> These lines seem unnecessary. In fact they unescape the escaped XML, making
>> the embedded XML become part of the containing XML, transforming it into
>> something else.
>>
>> Do you think this correction breaks anything else.
>>
>> Son Nguyen
>




--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.