From: Sonia Dalal <sonia12106@iiitd.ac.in>
Subject: Validating XML using Ada schema module
Date: Thu, 7 May 2015 08:53:20 -0700 (PDT)
Date: 2015-05-07T08:53:20-07:00 [thread overview]
Message-ID: <baf15d33-b7a1-4722-82c4-7b6d7d5a361c@googlegroups.com> (raw)
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.
next reply other threads:[~2015-05-07 15:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 15:53 Sonia Dalal [this message]
2015-05-07 15:58 ` Validating XML using Ada schema module Björn Lundin
2015-05-07 16:47 ` Simon Wright
2015-05-08 10:20 ` Sonia Dalal
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