Next in thread → Next in month →

RE: [xml-dev] Simple Schema

From
Priscilla Walmsley <>
To
'rajac' <>,
Date
2002-02-11T15:16:01Z
ID
<00be01c1b30f$1312e010$>
Thread
RE: [xml-dev] Simple Schema
Hi Raja,

There is a separate schema validation feature that you need to set in your
Java code.  It would look like:

parser.setFeature("http://apache.org/xml/features/validation/schema", true);


That may be the source of your problem.

Priscilla
------------------------------------------------------------------
Priscilla Walmsley                          
Vitria Technology                            http://www.vitria.com
Author, Definitive XML Schema                  (Prentice Hall PTR)
------------------------------------------------------------------

> -----Original Message-----
> From: rajac [mailto:]
> Sent: Sunday, February 10, 2002 7:12 PM
> To: 
> Subject: Re: [xml-dev] Simple Schema
>
>
> Hi KRUMPOLEC Martin,
>   Even then(after changing from minOccur to minOccurs), it is failing.
> Initially i was using minOccurs only.
>
> Rgds.,
> Raja
>
> ----- Original Message -----
> From: "KRUMPOLEC Martin" <>
> To: "'rajac'" <>; <>
> Sent: Monday, February 11, 2002 5:16 PM
> Subject: RE: [xml-dev] Simple Schema
>
>
> > Hi rajac,
> >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> > > <xs:element name="note">
> > >     <xs:complexType>
> > >       <xs:sequence>
> > >         <xs:element name="to" type="xs:string" minOccur="1"
> > > maxOccur="5"/>
> > >         <xs:element name="heading" type="xs:string" minOccur="1"
> > > maxOccur="5"/>
> > >         <xs:element name="body" type="xs:string" minOccur="1"
> > > maxOccur="5"/>
> > >       </xs:sequence>
> > >     </xs:complexType>
> > > </xs:element>
> > > </xs:schema>
> >
> >   Your schema is invalid - please note difference between
> >   minOccur/minOccurs and maxOccur/maxOccurs ...
> >
> > HTH
> >
> > Martin
> >
> > --
> > Martin Krumpolec <>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
>
Next in thread → Next in month →