comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
Subject: Re: Experiences of XML parser generators for Ada?
Date: 11 Dec 2004 10:03:01 +0100
Date: 2004-12-11T10:03:01+01:00	[thread overview]
Message-ID: <umzwlb41m.fsf@obry.net> (raw)
In-Reply-To: 41ba3938$0$12726$636a15ce@news.free.fr


Lionel Draghi <Lionel.nospam.Draghi@Ada-France.org> writes:

> > I'm not familiar with this part of XML Schema, but it looks as though
> > you could say
> > <xsd:simpleType name="money">
> >   <xsd:restriction base="positiveInteger">
> >     <xsd:minInclusive value="1"/>
> >     <xsd:maxInclusive value="10"/>
> >   </xsd:restriction>
> > </xsd:simpleType>
> OK. So I was wrong.

As you found out it is possible to specify ranges in the schema. Another
example is the character definition (strange enough there is no such type in
the WSDL standard, so you have to use a schema definition):

   <simpleType name="Character">
      <restriction base="xsd:string">
         <length value="1"/>
      </restriction>
   </simpleType>

So basically a string of length 1. This is exactly what ada2wsdl generates.

> Actually, I did not check the schema, because I don't intend to generate this
> by myself, or with one of those pretty tools available.
> I just gave a look at a glance to ada2wsdl results.
> ada2wsdl seems much more effective to me. But maybe it doesn't use the full
> WSDL semantics.

Right, at this point ada2wsdl does not check the bounds of the Ada type
definitions. So for whatever type that is based on integer it generates
a xsd:int. It would be possible to improve this, but I'm not sure it will be
very readable at the end... and I'm not sure those bounds will be checked on
the other side by Java/AXIS for example. Note that schemas have not been
designed for WSDL only. WSDL uses schemas to define some types but I have
never come across a WSDL document which had a very elaborated schema section.

It would also be nice to have the wsdl2aws tools properly handles those
bounds...

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  reply	other threads:[~2004-12-11  9:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-04 20:37 Experiences of XML parser generators for Ada? Robert C. Leif
2004-12-04 22:53 ` Adrien Plisson
2004-12-08 23:37   ` Lionel Draghi
2004-12-09 12:29     ` Georg Bauhaus
2004-12-09 21:04       ` Lionel Draghi
2004-12-09 21:09     ` Lionel Draghi
2004-12-10 22:09     ` Simon Wright
2004-12-11  0:02       ` Lionel Draghi
2004-12-11  9:03         ` Pascal Obry [this message]
     [not found] <20041203110026.6F40B4C408A@lovelace.ada-france.org>
2004-12-03 23:18 ` Robert C. Leif
2004-12-07 19:41   ` Björn Persson
  -- strict thread matches above, loose matches on Subject: below --
2004-12-02 21:04 Daniel W
2004-12-02 22:19 ` Georg Bauhaus
2004-12-03  8:57 ` Martin Krischik
2004-12-03  9:16   ` Adrien Plisson
2004-12-03 20:42     ` Daniel W
2004-12-03 23:33       ` Adrien Plisson
2004-12-04  8:05         ` Dmitry A. Kazakov
2004-12-04 11:40           ` Marius Amado Alves
2004-12-04 13:14             ` Martin Krischik
2004-12-05 16:27               ` Jeffrey Carter
2004-12-05 17:58                 ` Dmitry A. Kazakov
2004-12-04 13:59             ` Georg Bauhaus
2004-12-05  8:47               ` Martin Krischik
2004-12-06 11:18                 ` Georg Bauhaus
2004-12-06 18:12                 ` Pascal Obry
2004-12-13 20:34                   ` Florian Weimer
2004-12-05  1:50             ` David Botton
2004-12-04 14:01           ` Georg Bauhaus
2004-12-04 16:27             ` Dmitry A. Kazakov
2004-12-06  5:59         ` Daniel W
2004-12-06 14:48         ` Marc A. Criley
replies disabled

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