You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Berin Lautenbach <be...@wingsofhermes.org> on 2005/01/01 05:01:43 UTC

Re: Is this a bug? (C++ Version)

Jack,

I just opened up the source code to have a quick look - one thing I 
noticed is that you are using DOM Level 1 calls for adding attributes. 
I've had problems with that myself, so I'm wondering if that is where 
the issue is.

Rather than call
	
	setAttribute(name, value)
Try
	setAttributeNS(NULL, name, value);

I've noticed that Xerces sometimes doesn't pick up attributes for 
serialisation when they are added via L1 calls.  (The NS call is a Level 
2 call.)

Cheers,
	Berin

Jack Zhang wrote:

> Hi Berin,
> 
> I wrote a test program to demonstrate this problem, see attachment.
> 
> BTW, the Xerces I used is 2.4, I haven't attach the related dll because it's
> too large.
> 
> Thansk for your help
> Jack
> 
> 
>>----- Original Message -----
>>From: "Berin Lautenbach" <be...@wingsofhermes.org>
>>To: <se...@xml.apache.org>
>>Sent: Friday, December 24, 2004 12:34 PM
>>Subject: Re: Is this a bug? (C++ Version)
>>
>>
>>
>>>It definitely doesn't sound right.  Can you attach a snippet of code
>>>(preferably self contained - i.e. it should compile) that shows the
>>>problem and send it to me?
>>>
>>>Cheers,
>>>Berin
>>>
>>>ÕÅ ¼ò»¯ wrote:
>>>
>>>>Hi There,
>>>>
>>>>I append a new child node to the DOM document,
>>>>
>>>>1. The new node has no child node.
>>>>
>>>>2. The new node have several attributes (I use setAttribute function
> 
> to
> 
>>>>set the attributes)
>>>>
>>>>After I encrypt the DOM document, then load the enrypt document again
>>>>and decrypt it, found only one attribute was left, other attibutes
> 
> were
> 
>>>>lost.
>>>>
>>>>Before encrypt the DOM document, I have save the document, the saved
> 
> xml
> 
>>>>file is right.
>>>>
>>>>BTW, if don't use appendChild to append new node, just set attribute
> 
> of
> 
>>>>an exist node, no this problem.
>>>>
>>>>Is this a bug of XML Security C++ version?
>>>>
>>>>Regards
>>>>
>>>>Jack
>>>>
>>>>
>>>
>>------------------------------------------------------------------------
>>
>>>>ʹÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail
>>>><http://g.msn.com/8HMACNCN/2752??PS=47575> Get 2 months FREE*.
>>>
>>
> 
> 

RE: Is chinese characters supported? (C++ Version)

Posted by Milan Tomic <mi...@setcce.org>.
Hi,

It doesn't work in 1.0 version, but you can download sources from CVS
and it will work.

Best regards,
Milan


> -----Original Message-----
> From: Jack Zhang [mailto:jh_Zzz@hotmail.com] 
> Sent: Friday, March 11, 2005 5:48 AM
> To: security-dev@xml.apache.org
> Subject: Is chinese characters supported? (C++ Version)
> 
> 
> Hi there,
> 
> Did XML-Security support encode the xml document which 
> include Chinese characters (or unicode characters)?
> 
> I tried here, but the program crashed, I am using 
> xml-security 1.0 with xerces 2.4.
> 
> Best Regards
> Jack
> 



Is chinese characters supported? (C++ Version)

Posted by Jack Zhang <jh...@hotmail.com>.
Hi there,

Did XML-Security support encode the xml document which include Chinese
characters (or unicode characters)?

I tried here, but the program crashed, I am using xml-security 1.0 with
xerces 2.4.

Best Regards
Jack