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 Jeffrey Rodriguez <je...@hotmail.com> on 2000/08/30 19:16:58 UTC
Re: SV: bug. default value for enum attr doesn't match declared value s
Hi Richtnér,
I just tried the personal.xml and personal.dtd data files from
our distribution with the change to personal.dtd
><!ATTLIST person contr (true|false) #FIXED 'x'>
I run sax.SAXCount ( Xerces from current cvs extract) with validation on and
I get these results:
[Error] personal.dtd:7:47: The defaultValue "x" of attribute "contr" is not
lega
l as for the lexical constraints of this attribute type.
[Error] personal.xml:5:25: Attribute "contr" with value "x" must have a
value fr
om the list "(true|false)".
[Error] personal.xml:11:27: Attribute "contr" with value "x" must have a
value f
rom the list "(true|false)".
[Error] personal.xml:17:27: Attribute "contr" with value "x" must have a
value f
rom the list "(true|false)".
[Error] personal.xml:23:29: Attribute "contr" with value "x" must have a
value f
rom the list "(true|false)".
[Error] personal.xml:29:28: Attribute "contr" with value "x" must have a
value f
rom the list "(true|false)".
[Error] personal.xml:35:28: Attribute "contr" with value "x" must have a
value f
rom the list "(true|false)".
-------------------------------
excuse my mailer for breaking the output lines..... :>
-------------------------------
The output from sax.SAXCount with validation turn on looks correct
in my opinion.
So these are the possible reasons why you don't see an error:
1) This was a bug in 1.1.3 and it has been fixed.
2) You foo program does not have validation turn on and you
have not register an errorhandler.
Hope this helps,
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: SV: bug. default value for enum attr doesn't match declared value
>s
>Date: Wed, 30 Aug 2000 18:10:30 +0200
>
>
>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
>
><< foo.java >>
>---------------------------------------------------------------------
>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.