From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.182.166 with SMTP id ef6mr5651815pac.42.1431190187157; Sat, 09 May 2015 09:49:47 -0700 (PDT) X-Received: by 10.50.12.66 with SMTP id w2mr68142igb.11.1431190187079; Sat, 09 May 2015 09:49:47 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!m20no9806159iga.0!news-out.google.com!n7ni28999igk.0!nntp.google.com!m20no9806158iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 9 May 2015 09:49:46 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=116.74.5.198; posting-account=l8G6hgoAAADjKtWjPGHyywkx7knGLmuP NNTP-Posting-Host: 116.74.5.198 References: <46ce5d86-b624-4a96-8f12-c28e3a3ffd9f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Validating XML using Ada schema module From: Sonia Dalal Injection-Date: Sat, 09 May 2015 16:49:47 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:193099 Date: 2015-05-09T09:49:46-07:00 List-Id: On Saturday, May 9, 2015 at 9:24:29 PM UTC+5:30, bj=F6rn lundin wrote: > On 2015-05-08 12:20, Sonia Dalal wrote: >=20 > > The above code is what I have used in my xsd and I am following the Ada= documentation to generate grammar. >=20 > You do not show the actual Ada code. >=20 > > I am using GNAT 4.6 so it should be Ada 2005. > > Is it possible that it is due to some dependency or version clashes? >=20 > Maybe - or it is your code. But since you don't show your code > it is impossible to tell... >=20 > -- > Bj=F6rn ---------------------------------This is the xsd file data-----------------= ---- -----------This is the file which is being used to generate grammar--------= ----- with Ada.Text_IO; use Ada.Text_IO; with Schema.Schema_Readers, Schema.Validators, Input_Sources.File; use Schema.Schema_Readers, Schema.Validators, Input_Sources.File; procedure SchemaExample is Grammar : XML_Grammar; Schema : Schema_Reader; Read : File_Input; begin Open ("pref.xsd", Read); Parse (Schema, Read); Close (Read); Grammar :=3D Get_Grammar (Schema); exception when XML_Validation_Error =3D> Put_Line ("ERROR: " & Get_Error_Message (Schema)); end SchemaExample;