xml tools -> Design tools with XSD (&UML) output

Gerard Lemson gerard.lemson at mpe.mpg.de
Tue Dec 2 02:02:48 PST 2003


Hi Pierre
I've been working with both JAXB and Castor. I like both very much as an
very easy way
to parse, validate and interpret XML documents that implement an XML schema.
Recently I've started preferring Castor as it seems to be more flexible,
not least because you can actually get the source code (and debug it where
necessary).
Both are very nice though if you want to create your own parser, and if you
are able to adapt
your schemas where necessary to deal with unsupported features (such as
substitutionGroup).
The main nice features are that you can code against classes in a very type
safe way.
You do not have to look for elements or attributes by name and cast them to
whatever
type and so on.

The main disadvantage I have found sofar is that they can not be used for
parsing many of the VOTable-s
that are returned from cone searches registered with for example the JHU
registry.
The reason is that these parsers are validating by design and most VOTable-s
are not completely
valid according to the published VOTable schema. I mailed about this in
http://www.ivoa.net/forum/votable/0281.htm.

>From the opposite end, they are not completely validating. JAXB will allow
some documents that
are strictly speaking not valid. Especially regular expressions used in the
restriction of xs:string
for example are not checked properly. So if you want to ensure that a
document is valid, you would need to
validate them separately.
An easy way to do that can be extracted from the dom.ASBuilder class that
comes along with the
samples\ of the Xerces-2_5_0 Java XMl parser at
http://xml.apache.org/xerces2-j/index.html. (I see they're
at 2.6.0 already :0 )

Good luck.
Gerard



--
* Gerard Lemson                       * Tel: +49 (0)89 30000-3316
*
* MPI fuer extraterrestische Physik   * Fax: +49 (0)89 30000-3569
*
* Giessenbachstrasse                  *
*
* Postfach 1312                       *
*
* D-85741 Garching, GERMANY           * email: gerard.lemson at mpe.mpg.de
*


> -----Original Message-----
> From: owner-interop at eso.org [mailto:owner-interop at eso.org]On Behalf Of
> DIDELON Pierre
> Sent: Tuesday, December 02, 2003 10:44 AM
> To: interop at ivoa.net; womullan at skysrv.pha.jhu.edu
> Subject: Re: xml tools -> Design tools with XSD (&UML) output
>
>
> Hi,
> some tools to play with XML in Java have been suggested on the
> list sometime ago.
> On an other side and to feed the previous tools with XML Schema
> (xsd files)
> does anybody have a suggestion for a design tool generating XSD files?
> and possibly UML diag as weel!
> Will did you have any god idea like the Castor and JAXB previous ones?
>
> Thanks to all for any response.
>
> --
> Pierre
> ------------------------------------------------------------------
> -------------
> DIDELON                               e-mail : pdidelon_at_cea.fr
> CEA SACLAY - Service d'Astrophysique  W3 : http://www-dapnia.cea.fr/Sap/
> 91191 Gif-Sur-Yvette Cedex            Phone : 33 (0)1 69 08 58 89
> ------------------------------------------------------------------
> -------------
>
>
>
>



More information about the interop mailing list