You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by ne...@ca.ibm.com on 2001/03/01 16:32:28 UTC

RE: Bug in handling attributes, when importing nodes


Hi Karl,

I sort of broke Xerces's <any> support last week, but I think I fixed it
again on Tuesday.  So try a cvs update, rebuild and let me know if you
still have problems.

Cheers,
Neil

Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  416-448-3519, T/L 778-3519
E-mail:  neilg@ca.ibm.com



"Karl Scheibelhofer" <Ka...@iaik.at> on 02/28/2001 04:26:46 AM

Please respond to xerces-j-user@xml.apache.org

To:   <xe...@xml.apache.org>
cc:
Subject:  RE: Bug in handling attributes, when importing nodes


hi Neil,

i checked out the latest code from CVS yesterday. this fixed this first
bug.
but now, there is a new one. the latest code seems to have problems with
the
any-element and the namespace attribute.
when i try to parse the document
ExaminationCertificationData_unsigned_0001.xmlsignature.xml (see
attachment), i get the error
The content of element type "aida:signedContent" must match
"(eDocument|##other:uri=http://www.iaik.at/aida+)".
in my opinion, i matches (it also validates using the release 1.3.0 and
XMLSpy 3.5).

i hope, someone can help, regards

  Karl

PS: i had to set "protected boolean errorChecking = false;" in
DocumentImpl,
otherwise importing nodes fails, when the parser tries to import the
namespace attributes of the node.


> -----Original Message-----
> From: neilg@ca.ibm.com [mailto:neilg@ca.ibm.com]
> Sent: Tuesday, February 27, 2001 7:37 PM
> To: xerces-j-user@xml.apache.org
> Subject: Re: Bug in handling attributes, when importing nodes
>
>
>
>
> Hi Karl,
>
> This sounds like a bug that keeps getting reported once or twice a week
> which was fixed shortly after 1.3.0 was released.  Could you try
> extracting
> and building the latest code from CVS and test that to see if it solves
> your problem?
>
> Thanks,
> Neil
>
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone:  416-448-3519, T/L 778-3519
> E-mail:  neilg@ca.ibm.com
>
>
>
> "Karl Scheibelhofer" <Ka...@iaik.at> on 02/27/2001
> 02:56:38 AM
>
> Please respond to xerces-j-user@xml.apache.org
>
> To:   "Xerces-j User" <xe...@xml.apache.org>
> cc:
> Subject:  Bug in handling attributes, when importing nodes
>
>
> the new Xerces 1.3.0 seems to introduce a new bug with handling
> attributes,
> when importing elements from other documents. if i (deep) import
> an element
> with attributes, xerces 1.3.0 messes up the attributes of the newly
> imported
> node. with the version 1.2.1, it worked.
> i use sun jdk 1.3.0.
> i attached files that show the problem.
> ExaminationCertificationData_unsigned_0001.xml is the original document
> which i want to insert into a new signed one. if i do this using
>
>     Node importedContent = domDocument_.importNode(originalNode, true);
>     // add signedContent node
>     destinationParentElement_.appendChild(importedContent);
>
> xerces does not correctly handle the attributes. you can see this in the
> resulting document ExaminationCertificationData_0001.xmlsignature.xml.
the
> attributes of aida:eDocument/aida:signedContent/certificationData are
> messed.
> however, all this worked with xerces 1.2.1 (unfortunately with the old
> schemas).
>
> i hope, you can response quite soon.
>
>   Karl Scheibelhofer
>
> --
>
> Karl Scheibelhofer, <ma...@iaik.at>
> Institute for Applied Information Processing and Communications (IAIK)
> at Technical University of Graz, Austria, http://www.iaik.at
> Phone: (+43) (316) 873-5540
> (See attached file: bug.zip)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
(See attached file: bug2.zip)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: Bug in handling attributes, when importing nodes

Posted by Karl Scheibelhofer <Ka...@iaik.at>.
hi Neil,

it seems not to be completely fixed. the file
"personal-schema.xmlsignature.xml" should validate, but the current xerces
from CVS (i checked out the latest version two hours ago) reports an error:

Parser ERROR: The content of element type "aida:signedContent" must match
"(##any:uri=)+".
Public ID: null
System ID: null
Line Number: 54
Column Number: 25

even the error message is incorrect. i think that "aida:signedContent" must
match "(##other:uri=http://www.iaik.at/aida)+".
see the attached file(s).

i hope this helps to fix the problem,

  Karl Scheibelhofer

--

Karl Scheibelhofer, <ma...@iaik.at>
Institute for Applied Information Processing and Communications (IAIK)
at Technical University of Graz, Austria, http://www.iaik.at
Phone: (+43) (316) 873-5540


> -----Original Message-----
> From: neilg@ca.ibm.com [mailto:neilg@ca.ibm.com]
> Sent: Thursday, March 01, 2001 4:32 PM
> To: xerces-j-user@xml.apache.org
> Subject: RE: Bug in handling attributes, when importing nodes
>
>
>
>
> Hi Karl,
>
> I sort of broke Xerces's <any> support last week, but I think I fixed it
> again on Tuesday.  So try a cvs update, rebuild and let me know if you
> still have problems.
>
> Cheers,
> Neil
>
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone:  416-448-3519, T/L 778-3519
> E-mail:  neilg@ca.ibm.com
>
>
>
> "Karl Scheibelhofer" <Ka...@iaik.at> on 02/28/2001
> 04:26:46 AM
>
> Please respond to xerces-j-user@xml.apache.org
>
> To:   <xe...@xml.apache.org>
> cc:
> Subject:  RE: Bug in handling attributes, when importing nodes
>
>
> hi Neil,
>
> i checked out the latest code from CVS yesterday. this fixed this first
> bug.
> but now, there is a new one. the latest code seems to have problems with
> the
> any-element and the namespace attribute.
> when i try to parse the document
> ExaminationCertificationData_unsigned_0001.xmlsignature.xml (see
> attachment), i get the error
> The content of element type "aida:signedContent" must match
> "(eDocument|##other:uri=http://www.iaik.at/aida+)".
> in my opinion, i matches (it also validates using the release 1.3.0 and
> XMLSpy 3.5).
>
> i hope, someone can help, regards
>
>   Karl
>
> PS: i had to set "protected boolean errorChecking = false;" in
> DocumentImpl,
> otherwise importing nodes fails, when the parser tries to import the
> namespace attributes of the node.
>
>
> > -----Original Message-----
> > From: neilg@ca.ibm.com [mailto:neilg@ca.ibm.com]
> > Sent: Tuesday, February 27, 2001 7:37 PM
> > To: xerces-j-user@xml.apache.org
> > Subject: Re: Bug in handling attributes, when importing nodes
> >
> >
> >
> >
> > Hi Karl,
> >
> > This sounds like a bug that keeps getting reported once or twice a week
> > which was fixed shortly after 1.3.0 was released.  Could you try
> > extracting
> > and building the latest code from CVS and test that to see if it solves
> > your problem?
> >
> > Thanks,
> > Neil
> >
> > Neil Graham
> > XML Parser Development
> > IBM Toronto Lab
> > Phone:  416-448-3519, T/L 778-3519
> > E-mail:  neilg@ca.ibm.com
> >
> >
> >
> > "Karl Scheibelhofer" <Ka...@iaik.at> on 02/27/2001
> > 02:56:38 AM
> >
> > Please respond to xerces-j-user@xml.apache.org
> >
> > To:   "Xerces-j User" <xe...@xml.apache.org>
> > cc:
> > Subject:  Bug in handling attributes, when importing nodes
> >
> >
> > the new Xerces 1.3.0 seems to introduce a new bug with handling
> > attributes,
> > when importing elements from other documents. if i (deep) import
> > an element
> > with attributes, xerces 1.3.0 messes up the attributes of the newly
> > imported
> > node. with the version 1.2.1, it worked.
> > i use sun jdk 1.3.0.
> > i attached files that show the problem.
> > ExaminationCertificationData_unsigned_0001.xml is the original document
> > which i want to insert into a new signed one. if i do this using
> >
> >     Node importedContent = domDocument_.importNode(originalNode, true);
> >     // add signedContent node
> >     destinationParentElement_.appendChild(importedContent);
> >
> > xerces does not correctly handle the attributes. you can see this in the
> > resulting document ExaminationCertificationData_0001.xmlsignature.xml.
> the
> > attributes of aida:eDocument/aida:signedContent/certificationData are
> > messed.
> > however, all this worked with xerces 1.2.1 (unfortunately with the old
> > schemas).
> >
> > i hope, you can response quite soon.
> >
> >   Karl Scheibelhofer
> >
> > --
> >
> > Karl Scheibelhofer, <ma...@iaik.at>
> > Institute for Applied Information Processing and Communications (IAIK)
> > at Technical University of Graz, Austria, http://www.iaik.at
> > Phone: (+43) (316) 873-5540
> > (See attached file: bug.zip)
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> >
> >
> (See attached file: bug2.zip)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>