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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Trying to make XMLada use a validating SAX Parser Date: Thu, 04 Jun 2015 22:47:14 +0100 Organization: A noiseless patient Spider Message-ID: References: <463dff12-1b11-4f09-9d61-a46de6036c24@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="2c7d8f71a176d2eaa78ec9fbd86e1d4a"; logging-data="24550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YHWO7TBDpoLpXqfeRGoc7WqCp72hIltA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:NDsvhoGYxi1kGcBWgbmP6Av0boY= sha1:xwittgFPdFWCQQbhaBOQrpSxr/k= Xref: news.eternal-september.org comp.lang.ada:26185 Date: 2015-06-04T22:47:14+01:00 List-Id: Serge Robyns writes: > 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 ....". Validating_Reader isn't (now?) derived from SAX.Readers.Reader but instead from SAX.Readers.SAX_Reader, & the subprogram profile has changed. There's a comment in SAX.Readers recommending to upgrade to the new forms.