comp.lang.ada
 help / color / mirror / Atom feed
From: Sonia Dalal <sonia12106@iiitd.ac.in>
Subject: Re: Validating XML using Ada schema module
Date: Fri, 8 May 2015 03:20:13 -0700 (PDT)
Date: 2015-05-08T03:20:13-07:00	[thread overview]
Message-ID: <46ce5d86-b624-4a96-8f12-c28e3a3ffd9f@googlegroups.com> (raw)
In-Reply-To: <baf15d33-b7a1-4722-82c4-7b6d7d5a361c@googlegroups.com>

On Thursday, May 7, 2015 at 9:23:22 PM UTC+5:30, Sonia Dalal wrote:
> Hi all
> 
> I am new to ada. I am working on a project where I am parsing XML for data. I am trying to validate the XML received (I am receiving XML from third party) using the schema module. Following is the sample schema which I took from w3c site after I was getting raised CONSTRAINT_ERROR : schema-validators.adb:2166 invalid data for my own schema but I am getting same error for this schema.
> 
> <?xml version="1.0"?>
> 
> <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"/>
>       <xs:element name="from" type="xs:string"/>
>       <xs:element name="heading" type="xs:string"/>
>       <xs:element name="body" type="xs:string"/>
>     </xs:sequence>
>   </xs:complexType>
> </xs:element>
> 
> </xs:schema>
> 
> Changing the version and scheam tag to 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> targetNamespace="http://example.com/schemas/agent"
> xmlns:agent="http://example.com/schemas/agent"> 
> 
> does not make any difference. I tried looking into schema-validators.adb but that was of no use. Please help.



The above code is what I have used in my xsd and I am following the Ada documentation to generate grammar. 
I have put my xsd code aside just to figure out what is the reason for error as it is same in both the scenarios.
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?


  parent reply	other threads:[~2015-05-08 10:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 15:53 Validating XML using Ada schema module Sonia Dalal
2015-05-07 15:58 ` Björn Lundin
2015-05-07 16:47   ` Simon Wright
2015-05-08 10:20 ` Sonia Dalal [this message]
2015-05-09 15:55   ` Björn Lundin
2015-05-09 16:49     ` Sonia Dalal
2015-05-09 21:08       ` Björn Lundin
2015-05-10 18:16         ` Simon Wright
2015-05-11 12:17         ` Sonia Dalal
2015-05-12 20:32           ` Björn Lundin
2015-05-14  6:00             ` Sonia Dalal
2015-05-14 12:41               ` Björn Lundin
2015-05-14 14:21                 ` Sonia Dalal
2015-05-14 15:06                   ` Sonia Dalal
2015-05-14 15:56                     ` Björn Lundin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox