comp.lang.ada
 help / color / mirror / Atom feed
* Validating XML using Ada schema module
@ 2015-05-07 15:53 Sonia Dalal
  2015-05-07 15:58 ` Björn Lundin
  2015-05-08 10:20 ` Sonia Dalal
  0 siblings, 2 replies; 15+ messages in thread
From: Sonia Dalal @ 2015-05-07 15:53 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-14 15:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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