commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [betwixt] How to get mixed-content of element?
Date Thu, 20 Mar 2003 18:04:24 GMT
On Thursday, March 20, 2003, at 02:13 PM, Maksimenko Alexander wrote:

>
>> hi
>>
>> i've added this functionality (it took a bit more work than i'd thought
>> but it's worth it). if you check out CVS HEAD and build the latest 
>> version
>> or wait until a new nightly build then you give it a go. note that the
>> element name (in the betwixt file) is text. there should be some
>> documentation about this feature on the web site. (but i'll take another
>> look and maybe improve it tommorrow.)
>>
>> if you try it, please let me know how you get on.
>>
>> - robert
>>
>
> thanks. everything works very good. But I have some questions concerning 
> the
> code you've done
> 1)What for do you use the attribute "type" ?

a good question :)

it's undocumented but used in element rule. james created it before i 
started being involved with betwixt. i have an idea that it's used to help 
with the property type but i'm not 100% sure. i intend to investigate it 
soon so that i can create some test cases for it. if you find out - please 
let me know!

> 2)I think that the body should be wrapped by <![CDATA[ ... ]]> Otherwise 
> we
> will get invalid xml file if the bean property has string value like "P&G
> company"

body text should be escaped before it's written. if it's not then thats a 
bug. (i will take a look at this and see if we have a test case for it.)

there are some (uncommon?) use cases which may require the use of <![CDATA[
..]]> but this support needs to be rolled out for all body text rather 
than just this particular kind.

- robert


Mime
View raw message