You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Tony Wuebben <wu...@lexis-nexis.com> on 2000/09/14 21:30:57 UTC

Possible Bug with default attributes??

I have been using 1.2a on Solaris all summer. I have just downloaded the
lastset nightly build so that I could get the bug fix for creating
entity reference nodes during DOM tree creation.  I've recompiled my
code and I got the following when reading in a file/DTD combo that works
with version 1.2a

 Type:IllegalArgumentException, Message:String pool id was not legal

After hours of trial and error, I created a new DTD and file. The
following problem is what I am seeing.

If in the DTD I have a element who has an attribute defined to have a
default attribute value, if no value is specifed. Then the sum of it's
ancestors attributes (in the DTD) cannot be greater than 4. I know this
sounds bizarre, but someone please try it on solaris.

DTD
---
<!ELEMENT GRANDPA (DAD)*>
<!ATTLIST GRANDPA
                first   CDATA #IMPLIED
                second  CDATA #IMPLIED>
 
<!ELEMENT DAD (CHILD)*>
<!ATTLIST DAD
                third   CDATA #IMPLIED
                fourth   CDATA #IMPLIED
                fifth   CDATA #IMPLIED>
 
<!ELEMENT CHILD (#PCDATA)*>
<!ATTLIST CHILD
                sex (male | female | unknown)   "unknown">

XML DOCUMENT
-------------
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE GRANDPA PUBLIC
"-//EAMPLE//GRANDPA 01.000//EN" "grandpa.dtd"><GRANDPA><DAD><CHILD
sex="unknown"/></DAD></GRANDPA>



*) remove the any attribute from GRANDPA or DAD, it works
*) put the fifth attribute back and change "unknown" to #IMPLIED, it
works

Thanks in advance.
Tony Wuebben

Re: Possible Bug with default attributes??

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
Never mind, I found it. I had setDoNamespaces = true. Once I turned of
Namespacing it worked. 



Tony Wuebben wrote:
> 
> I narrowed this down between the July 5 nightly build (it works then)
> and the July 7 nightly build, <-- This is when there error I am getting
> was introduced.
> 
> Tony Wuebben wrote:
> >
> > I have been using 1.2a on Solaris all summer. I have just downloaded the
> > lastset nightly build so that I could get the bug fix for creating
> > entity reference nodes during DOM tree creation.  I've recompiled my
> > code and I got the following when reading in a file/DTD combo that works
> > with version 1.2a
> >
> >  Type:IllegalArgumentException, Message:String pool id was not legal
> >
> > After hours of trial and error, I created a new DTD and file. The
> > following problem is what I am seeing.
> >
> > If in the DTD I have a element who has an attribute defined to have a
> > default attribute value, if no value is specifed. Then the sum of it's
> > ancestors attributes (in the DTD) cannot be greater than 4. I know this
> > sounds bizarre, but someone please try it on solaris.
> >
> > DTD
> > ---
> > <!ELEMENT GRANDPA (DAD)*>
> > <!ATTLIST GRANDPA
> >                 first   CDATA #IMPLIED
> >                 second  CDATA #IMPLIED>
> >
> > <!ELEMENT DAD (CHILD)*>
> > <!ATTLIST DAD
> >                 third   CDATA #IMPLIED
> >                 fourth   CDATA #IMPLIED
> >                 fifth   CDATA #IMPLIED>
> >
> > <!ELEMENT CHILD (#PCDATA)*>
> > <!ATTLIST CHILD
> >                 sex (male | female | unknown)   "unknown">
> >
> > XML DOCUMENT
> > -------------
> > <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE GRANDPA PUBLIC
> > "-//EAMPLE//GRANDPA 01.000//EN" "grandpa.dtd"><GRANDPA><DAD><CHILD
> > sex="unknown"/></DAD></GRANDPA>
> >
> > *) remove the any attribute from GRANDPA or DAD, it works
> > *) put the fifth attribute back and change "unknown" to #IMPLIED, it
> > works
> >
> > Thanks in advance.
> > Tony Wuebben
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

Re: Possible Bug with default attributes??

Posted by Tony Wuebben <wu...@lexis-nexis.com>.
I narrowed this down between the July 5 nightly build (it works then)
and the July 7 nightly build, <-- This is when there error I am getting
was introduced.




Tony Wuebben wrote:
> 
> I have been using 1.2a on Solaris all summer. I have just downloaded the
> lastset nightly build so that I could get the bug fix for creating
> entity reference nodes during DOM tree creation.  I've recompiled my
> code and I got the following when reading in a file/DTD combo that works
> with version 1.2a
> 
>  Type:IllegalArgumentException, Message:String pool id was not legal
> 
> After hours of trial and error, I created a new DTD and file. The
> following problem is what I am seeing.
> 
> If in the DTD I have a element who has an attribute defined to have a
> default attribute value, if no value is specifed. Then the sum of it's
> ancestors attributes (in the DTD) cannot be greater than 4. I know this
> sounds bizarre, but someone please try it on solaris.
> 
> DTD
> ---
> <!ELEMENT GRANDPA (DAD)*>
> <!ATTLIST GRANDPA
>                 first   CDATA #IMPLIED
>                 second  CDATA #IMPLIED>
> 
> <!ELEMENT DAD (CHILD)*>
> <!ATTLIST DAD
>                 third   CDATA #IMPLIED
>                 fourth   CDATA #IMPLIED
>                 fifth   CDATA #IMPLIED>
> 
> <!ELEMENT CHILD (#PCDATA)*>
> <!ATTLIST CHILD
>                 sex (male | female | unknown)   "unknown">
> 
> XML DOCUMENT
> -------------
> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE GRANDPA PUBLIC
> "-//EAMPLE//GRANDPA 01.000//EN" "grandpa.dtd"><GRANDPA><DAD><CHILD
> sex="unknown"/></DAD></GRANDPA>
> 
> *) remove the any attribute from GRANDPA or DAD, it works
> *) put the fifth attribute back and change "unknown" to #IMPLIED, it
> works
> 
> Thanks in advance.
> Tony Wuebben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org