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/09/16 01:12:28 UTC
Re: bug: schema validation - enumeration values with special characte rs
Hi Doug,
I will look into this.
Thanks for reporting this problem.
Jeffrey Rodriguez
IBM Silicon Valley
XML Development
>From: "Smith, Doug" <Do...@fmr.com>
>Reply-To: xerces-j-dev@xml.apache.org
>To: xerces-j-dev@xml.apache.org
>Subject: bug: schema validation - enumeration values with special characte
>rs
>Date: Fri, 15 Sep 2000 18:26:52 -0400
>
>Greetings,
>
>Forgive if this is not really a bug - it's been a long week.
>
>I've got the following input document:
>
><?xml version="1.0" encoding="UTF-8" ?>
><Test
> xsi:noNamespaceSchemaLocation="http://localhost/test.xsd"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >
> <TestValue>M&M</TestValue>
></Test>
>
>I am validating it against the following schema:
>
><schema xmlns="http://www.w3.org/1999/XMLSchema">
>
> <element name='Test' type='TestType'/>
>
> <complexType name='TestType'>
> <element name='TestValue'>
> <simpleType base='string'>
> <enumeration value='Foo'/>
> <enumeration value='Bar'/>
> <enumeration value='M&M'/>
> </simpleType>
> </element>
> </complexType>
></schema>
>
>I get the following error:
>
>org.xml.sax.SAXParseException: Datatype error: Value 'MM' must be one of
>[Foo, Bar, M&M].
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> org.xml.sax.SAXException(java.lang.String)
> org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator)
> void
>org.apache.xerces.framework.XMLParser.reportError(org.xml.sax.Locator,
>java.lang.String, int, int, java.lang.Object [], int)
> int
>org.apache.xerces.validators.common.XMLValidator.checkContent(int,
>org.apache.xerces.utils.QName [], int, int)
> void
>org.apache.xerces.validators.common.XMLValidator.callEndElement(int)
> boolean
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(bo
>olean)
> boolean
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean)
> void
>org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
>
>Sending the data as <![CDATA[M&M]]> works...
>
>Thanks.
>
>--Doug
>
>---------------------------------------------------------------------
>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.