OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Simple Schema

[ Lists Home | Date Index | Thread Index ]

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                          priscilla@walmsley.com
Vitria Technology                            http://www.vitria.com
Author, Definitive XML Schema                  (Prentice Hall PTR)
------------------------------------------------------------------

> -----Original Message-----
> From: rajac [mailto:rajac@ncmr.co.in]
> Sent: Sunday, February 10, 2002 7:12 PM
> To: xml-dev@lists.xml.org
> 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" <krumpolec@asset.sk>
> To: "'rajac'" <rajac@ncmr.co.in>; <xml-dev@lists.xml.org>
> 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 <krumpo@pobox.sk>
>
>
> -----------------------------------------------------------------
> 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>
>
>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS