xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Goei <Edwin.G...@eng.sun.com>
Subject Re: Crimson 1.1.1 bug: default attribute value is not returned.
Date Wed, 18 Jul 2001 21:31:57 GMT
Donatas Ciuksys wrote:
> 
> Hello Edwin,
> 
> So I'm sending you example code showing the bug of crimson1.1.1.
> I gave wrong description for this bug. The good one would be following:
> 
> If I have a document with an element without attributes (but DTD declares an
> attribute with default value for this element), and I import this element to
> a new document, the attribute with default value is not copied.
> 
> Attached you will find the source code example for this bug.
> 
> (Just FYI: xerces 1.4.0 also has this bug, but in 1.4.1 it is allready
> fixed.)

As I read the DOM spec under ELEMENT_NODE at
http://www.w3.org/TR/DOM-Level-2-Core/core.html#Core-Document-importNode,
it says that default attributes are _not_ copied.  So I'm not yet
convinced this is a bug.

-Edwin

> 
> Regards,
> Donatas
> 
> ----- Original Message -----
> From: "Edwin Goei" <edwingo@sun.com>
> To: <general@xml.apache.org>; "Donatas Ciuksys" <donatas.ciuksys@maf.vu.lt>
> Sent: Thursday, July 12, 2001 22:35
> Subject: Re: Crimson 1.1.1 bug: default attribute value is not returned.
> 
> Donatas Ciuksys wrote:
> >
> > Hello,
> >
> > Yesterday I evaluated your new crimson 1.1.1 package and found that it
> > contains a bug. If DTD declares attribute with default value, and element
> in
> > xml document does not specifies this attribute, then parser should return
> > default value for this attribute. This is how crimson 1.1 was functioning,
> > but 1.1.1 does not anymore - it returns empty string.
> > Hope you will fix this.
> 
> I was not able to reproduce your problem.  Could you send me a simple
> test case?
> 
> -Edwin
> 
>   ------------------------------------------------------------------------
>                          Name: TestCrimson111.xml
>    TestCrimson111.xml    Type: text/xml
>                      Encoding: 7bit
> 
>                           Name: TestCrimson111.java
>    TestCrimson111.java    Type: unspecified type (application/octet-stream)
>                       Encoding: quoted-printable

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message