RE: Attribute default values in DTD is not available in the DOMDocument.

2003-08-22 Thread Gareth Reakes
gt; specified attributes, not the defaults. > Am using xerces 2.3.0, win32. > > > > Apologies if this has been cleared up already, I > trawled the archives but came up with nothing. > > rgds > Andrew Fuller > > > > List: xerces-c-dev > Subject

RE: Attribute default values in DTD is not available in the DOMDocument.

2003-08-21 Thread Andrew Fuller
xerces-c-dev Subject: RE: Attribute default values in DTD is not available in the DOMDocument. From: Gareth Reakes Date: 2002-09-23 17:11:11 [Download message RAW] OK, well this is the code thats the problem (in DOMDocumentImpl::importNode): if (

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-24 Thread Erik Rydgren
I say yes. / Erik -Original Message- From: Gareth Reakes [mailto:[EMAIL PROTECTED]] Sent: den 23 september 2002 19:11 To: [EMAIL PROTECTED] Subject: RE: Attribute default values in DTD is not available in the DOMDocument. OK, well this is the code thats the problem (in

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-23 Thread Gareth Reakes
OK, well this is the code thats the problem (in DOMDocumentImpl::importNode): if (smap != 0) { for(XMLSize_t i = 0; i < smap->getLength(); i++) { tmap->setNamedItem(importNode(smap->item(i), true, false)); } }

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-23 Thread Gareth Reakes
Hi, well this has been fun. Ive looked into this a bit now and think I know whats going on. cloneNode is implemented by using importNode. Unfortunately there is a difference in behaviour. >From the level 2 spec for importNode: "Specified attribute nodes of the source element are impor

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-23 Thread Erik Rydgren
Well now it is time to set things streight. The default values in DOM are in fact working *blush*. Found it out during the test that Gareth did suggest. The extra code that I suggested is not needed. Somewhere deep down in the parser the default values are transferred into the standard attribute l

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-23 Thread Gareth Reakes
Hi again, thank god, I was being stupid. I can now access the attrs. Monday morning thinking. I do think that the default attr code may be a bit broken though. Gareth On Mon, 23 Sep 2002, Gareth Reakes wrote: > Hi, > what version of xerces are you using? I still cant get any

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-23 Thread Gareth Reakes
Hi, what version of xerces are you using? I still cant get any attributes if I use the following xml: let alone if I have default attrs!! I have now tried this with the CVS tree as well as 2.0. I have difficulty in believing that this has not been noticed by users as it seems fai

RE: Attribute default values in DTD is not available in the DOMDocument.

2002-09-20 Thread Erik Rydgren
I did some serious debugging and have tracked my problem down to the document cloning process. Everything looks dandy until then except that I can not access the default attributes but at least they are there in DOMElementImpl::fDefaultAttributes. So I modified some fuctions to be able to access t

Re: Attribute default values in DTD is not available in the DOMDocument.

2002-09-20 Thread Gareth Reakes
Hi, Ive had a quick look and it seems to be a little bit broken. Look at the following XML and DTD files selecting the attributes from greeting now returns a null DOMNamedNodeMap. If you remove the DOCTYPE from the XML you get the expected 2 attributes! I don't currently have