New "AS XML" feature

Thorsten Hohage thohage at genericobjects.de
Fri Oct 31 04:14:42 CDT 2008


Hi,

I really recommend oxygen for working with XML!!!!

On 2008-10-31, at 09:51, Ivan Smahin wrote:
> <t1 f1="Editions RM - 626, rue Notre-Dame Est, Trois-Rivieres G8T  
> 4G9 Quebec - Canada&#x0D;&#x0A;&#x0D;&#x0A;&#x0C;"/>

> Both XMLs can not be validating later...
> FATAL ERROR: Invalid character reference
>
> AFAIK there is a set of symbols which are not
> allowed for XML 1.0 - I mean it can not be even set as '&#x..;'
> Am I right - there are two such ranges:
> &#x1; - &#x1F;
> &#x7F; - &#x9F;
> ?

No, not exactly ....

<?xml version="1.0" encoding="UTF-8"?>
<testDocument>
     <test>C&amp;A</test>
     <test2>&#x0D;</test2>
     <test3 f1="C&amp;A" />
     <test4 f1="&#x0A;" />
</testDocument>

THIS is a perfect valid XML Document


&#x01 - &#x08 invalid
&#x0B, &#x0C, &#x0E, ... &#x0F, invalid

BUT

&#x09, &#x0A, &#x0D	valid

But the problem here - a lot of other "system" will have issues with  
control characters in text field, too. Of course, when dealing with  
e.g. RTF in a varchar field it must be placed in a CDATA, but using  
"clean" text e.g. a name field, then it must not. So perhaps it would  
be a great idea to check, what type of content is in the column, or to  
give a property a developer can set to switch on / of CDATA.  
Furthermore I believe, that a text longer than a given lenght can  
always be placed in CDATA, e.g. longer than 512 chars.


regards,

Thorsten Hohage
-- 

Valentina Technology Evangelist
generic objects  GmbH - Leiter Solution Center Nord



More information about the Valentina-beta mailing list