STC2 Docs available but do you plan to provide xml schema ?
Gerard Lemson
gerard.lemson at gmail.com
Thu May 25 19:49:49 CEST 2017
HI Pierre
On Mon, May 22, 2017 at 11:12 PM, Pierre Le Sidaner <
pierre.lesidaner at obspm.fr> wrote:
> Hi
>
> I have seen the description of the STC2 DM at
> http://volute.g-vo.org/svn/trunk/projects/dm/STC-2.0/doc
>
> I have seen also xmi files model directory
>
> My question is mainly for VO-DML group, is there a possibility to have
> STC2 express in an xml schema (xsd) ?
>
> It would be very useful to make usage of it and validate.
>
> Does VO-DML have tool to transform the serialisation of schema into such a
> format ?
>
>
There is currently no script to translate from VO-DML to XSD.
But nothing stops one from creating one, the mapping between VO-DMl and XSD
is quite straightforward. See appendix B1 of the VO-DML spec for an
example.
In fact there is such an XSLT script for the related VO-URP "spec" at
https://github.com/glemson/vo-urp/blob/master/res/intermediate2xsd.xsl
This was used to create the XSD representation for the Simulation DM in
http://www.ivoa.net/documents/SimDM/20120503/xsd/
It's source was what we then called the intermediate representation" of the
data model in
http://www.ivoa.net/documents/SimDM/20120503/uml/SimDM_INTERMEDIATE.xml
See section 4.2 of the simulation data model (
http://www.ivoa.net/documents/SimDM/20120503/index.html) for a short
description.
The intermediate XML is closely related to the VO-DML/XML. Hence it should
not be hard to modify the XSLT to also work for VO-DML, and I have planned
to do that once I found the time. Maybe someone else can use it as
inspiration?
Main difference between VO-DML and VO-URP is that the former can import
models and in fact the primitive datatypes are defined in the base ivoa
model in VO-DML, but as an enumeration in VO-URP.
And also note that a particular mapping scheme was used in the XSLT.
Laurent Bourges and I used that in a web application that translates
between XSD, Java and RDB, but it may not be to everyone's liking. In
particular the treatment of references was tricky. We also made the
explicit decision to separate the type definitions from the definitions of
the root elements. And those were limited to correspond to the non abstract
root types only, i.e. those that are not the child in a composition
relation.
I am happy to assist in porting the XSLT from VO-URP to VO-DML, but hope
others are interested as well.
Cheers
Gerard
> regards
>
> Pierre
>
> --
> -------------------------------------------------------------------------
> Pierre Le Sidaner
> Observatoire de Paris
>
> Direction Informatique de l'Observatoire
> Observatoire Virtuel 01 40 51 20 82
> 61, avenue de l'Observatoire 75014 Paris
>
> mailto:pierre.lesidaner at obspm.fr
> http://padc.obspm.fr
>
> --------------------------------------------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dm/attachments/20170525/655b95a9/attachment.html>
More information about the dm
mailing list