You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Donatas Ciuksys <do...@maf.vu.lt> on 2001/07/03 13:15:17 UTC

Crimson 1.1.1 bug: default attribute value is not returned.

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.

Regards,
Donatas Ciuksys
Prof. assistant,
Informatics department
Vilnius University


---------------------------------------------------------------------
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


Re: Crimson 1.1.1 bug: default attribute value is not returned.

Posted by Edwin Goei <Ed...@eng.sun.com>.
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" <ed...@sun.com>
> To: <ge...@xml.apache.org>; "Donatas Ciuksys" <do...@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


Re: Crimson 1.1.1 bug: default attribute value is not returned.

Posted by Edwin Goei <ed...@sun.com>.
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

---------------------------------------------------------------------
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