You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Richtnér Fredrik <fr...@wmdata.com> on 2000/08/30 18:10:30 UTC

SV: bug. default value for enum attr doesn't match declared value s

My XML instance is personal.xml distributed with xerces. In the DTD
(personal.dtd)
I have changed the attribute declaraction for contr to:

<!ATTLIST person contr (true|false) #FIXED 'x'>

Output:

bash-2.04$ java -classpath "xerces.jar;." foo data/personal.xml

/Fredrik


-----Ursprungligt meddelande-----
Från: Jeffrey Rodriguez [mailto:jeffreyr_97@hotmail.com]
Skickat: den 30 augusti 2000 17:43
Till: xerces-j-dev@xml.apache.org
Ämne: Re: bug. default value for enum attr doesn't match declared values


Hi Richtnér,

I am not able to reproduce your problem with current cvs version
of xerces-j.

My dtd:

<!ELEMENT foo EMPTY>
<!ATTLIST foo	a1 ( a | b | c ) "d">

My instance document:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo SYST

run sax.SAXCount with validation on:
[Error] att.dtd:2:35: The defaultValue "d" of attribute "a1" is not legal as

for
the lexical constraints of this attribute type.
[Error] attbug.xml:3:15: Attribute "a1" with value "d" must have a value 
from th
e list "(a|b|c)".
attbug.xml: 1532 ms (1 elems, 1 attrs, 0 spaces, 0 chars)

This is what I would expect.

1) Are you sure that you are running with validation on.

2) Please could you provide your complete dtd and instance document.


Thanks for reporting this and for your interest in Xerces-j.


              Jeffrey Rodriguez
              IBM Silicon Valley
              XML development









>From: Richtnér Fredrik <fr...@wmdata.com>
>Reply-To: xerces-j-dev@xml.apache.org
>To: "'xerces-j-dev@xml.apache.org'" <xe...@xml.apache.org>
>Subject: bug. default value for enum attr doesn't match declared values
>Date: Wed, 30 Aug 2000 15:44:59 +0200
>
>
>I want to report a bug.
>Xerces 1.1.3 doesn't report the following attribute declaration as an 
>error.
><!ATTLIST foo	a1 ( a | b | c ) "d">
>The default value doesn't match any of the enumerated values for the
>attribute.
>
>The error occurs for notation attributes as well.
><!ATTLIST foo	a2 NOTATION ( gif | jpeg ) "tif">
>
>/Fredrik
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org