comp.lang.ada
 help / color / mirror / Atom feed
* Trying to make XMLada use a validating SAX Parser
@ 2015-06-04 20:59 Serge Robyns
  2015-06-04 21:47 ` Simon Wright
  2015-06-08 22:45 ` wowwomenonwheels205
  0 siblings, 2 replies; 12+ messages in thread
From: Serge Robyns @ 2015-06-04 20:59 UTC (permalink / raw)


Being very new to the Ada object programming and desiring to write an application in Ada that is capable of reading XML data I'm fighting to use XMLada.  The AdaCore documentation and Google isn't providing much help.

I've managed to do some stuff in Ada in the past (booting a full native gnat kernel attempt, back in 2001).

So far I managed to:
  1) use a SAX parser to read the file and create ADA objects. (SAX.Readers.Reader)
  2) use the DOM reader to read an XML file and and walk the tree.
  3) use the DOM reader and have the file validated by the XSD. (Schema.Dom_Readers.Tree_Reader) and walk the tree.
  4) use the SAX validating parser to validate the XML file. (Schema.Readers.Validating_Reader) but without creating Ada objects.

But what doesn't work is to use the SAX validating parser to validate and call the callbacks to build my objects.

Below is the code I'm trying to compile:

with Unicode.CES;
with Sax.Readers;
with Sax.Attributes;
with Schema.Readers;

package MyXML is
      -- type MyReader is new SAX.Readers.Reader with null record;
      type MyReader is new Schema.Readers.Validating_Reader with null record;

      overriding procedure Start_Element (
                               Handler           : in out MyReader;
                               The_Namespace_URI : Unicode.CES.Byte_Sequence := "";
                               The_Local_Name    : Unicode.CES.Byte_Sequence := "";
                               Qname             : Unicode.CES.Byte_Sequence := "";
                               Atts              : Sax.Attributes.Attributes'Class
                              );
end MyXML;

When I try to compile the compiler complains that the subprogram "Start_Element" is not overriding.  However, according to the adacore documentation for xmlada it does say in section 6.4 that "As usual, you can still override the predefined ....".

Does anyone have an explanation for my error?

Thanks you.

Serge



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

end of thread, other threads:[~2015-06-08 22:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 20:59 Trying to make XMLada use a validating SAX Parser Serge Robyns
2015-06-04 21:47 ` Simon Wright
2015-06-05 15:47   ` Serge Robyns
2015-06-05 17:50     ` David Botton
2015-06-05 23:33       ` Vadim Godunko
2015-06-06  8:22       ` Pascal Obry
2015-06-06 10:04         ` Serge Robyns
2015-06-07  3:42           ` David Botton
2015-06-07  7:19             ` Simon Wright
2015-06-07 12:00               ` David Botton
2015-06-07  3:29         ` David Botton
2015-06-08 22:45 ` wowwomenonwheels205

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