[x3d-public] Using X3D Object Model XSD and tools outside of X3D

yottzumm at gmail.com yottzumm at gmail.com
Thu Sep 22 17:54:21 PDT 2016


Now the question is, what’s the quickest way to form a schema or model, period?  How much can a computer take over the role?

John

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Thursday, September 22, 2016 8:43 PM
To: Don Brutzman; X3D Graphics public mailing list
Cc: Roy Walmsley
Subject: RE: Using X3D Object Model XSD and tools outside of X3D

Okay, I’ve been looking into it some more and it looks like an autogenerated X3D JSON schema would help with generating the models for my API (the schema appears to be very similar to the models).  So I’m going to take the X3D XML Schema and try to produce the X3D JSON Schema (or a model like the OpenAPI Specification has).  After that, I will have to generate resources, codes, etc. in the REST protocol from the Java API example, if it is available.  I know Roy has generation of the X3D JSON Schema in mind, but with a little Java work, I may be able to leapfrog him.  Of course, if I run into any difficulty, I will come running.

Any comments on SOA versus REST?  I was considering REST with XPATH resources.

John
Sent from Mail for Windows 10

From: Don Brutzman
Sent: Thursday, September 22, 2016 3:09 PM
To: yottzumm at gmail.com; X3D Graphics public mailing list
Cc: Roy Walmsley
Subject: Re: Using X3D Object Model XSD and tools outside of X3D

On 9/20/2016 6:11 PM, yottzumm at gmail.com wrote:
> What is the potential for using the X3D Object Model XSD, “schema” XML and tools to generate an Object Model and related APIs outside of the context of X3D?  I already sent Don and Roy a skype message.  Currently, we are using swagger.io, but I would like to start from an XML or JSON context instead of a YAML context, so translation or another tool is indicated.  Is there a good tool to translate XML Schema or XML Object Model to swagger YAML, and thus providing the way for a REST API and other artifacts in many languages, without having to write XSLT for all of them?n
>
> Also, I am interested in generating SQL or NoSQL (ElasticSearch) Schema from the Object Model.
>
> Just trying to feel out the domain of autogeneration again after years of being away (23 years).
========

On 9/22/2016 2:17 AM, John Carlson wrote:
> Don, given I have my own XML schema, how hard or easy is it to generate my own object model and Java API?  How does this compare to the OpenAPI Specification?  (for REST).   Can the networking group leverage any of this work to create a REST API?
>
> Thanks
========

Your question is much appreciated John.  (Apologies for delayed response, am attending MTS/IEEE OCEANS 2016 Conference.)

It is good to finally begin proceeding with object-oriented code-autogeneration testing of the X3D Object Model.  As testing to date has shown, we think that the interface hierarchy defined in the X3D Abstract Specification will be further shown as viable and correct, with occasional small corrections and refinements to match the rigor of an even-stricter object model.  At the same time, we are being very careful to avoid inserting any constructs that are peculiar to any particular programming language.  Continued testing will help ensure that a language-independent object model is being expressed.

                X3D Part 1: Architecture and base components
                4.4.2.3 Interface hierarchy
                http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#InterfaceHierarchy
                (original Figure 4.2 by Joe Williams)

This generality is not a complete surprise, since perhaps two dozen codebases have implemented the X3D/VRML interface hierarchy.

                http://www.web3d.org/x3d/content/examples/X3dResources.html#Applications

Roy and I have anticipated broader potential usage of the X3D Object Model.  This is why it is expressed in a simple form of XML.  To facilitate conversions, we have also created a simple stylesheet that can be adapted to produce alternate forms.  Reference links and example conversions follow.

                X3D Object Model (autogenerated from X3D XML schema)
                http://www.web3d.org/specifications/X3DObjectModel-3.3.xml

                http://www.web3d.org/x3d/stylesheets/AllX3dElementsAttributesTextTemplate.xslt
                http://www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes3.3.xml
                http://www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes3.3.txt

The template above simply marches through the object model and outputs each element and attribute.  So you have a node/field inventory that is easily checked.

Next.  It will be good to learn more about the relevant parts of both YAML and OpenApI, as you think best.

                https://en.wikipedia.org/wiki/YAML
                http://yaml.org
                http://www.yaml.org/start.html

                https://en.wikipedia.org/wiki/OpenAPI_Specification
                https://openapis.org/specification
                https://openapis.org

SQL/NoSQL are further interesting!  I think it will be important in each of these cases to be clear what the focus is: producing X3D documents, producing validation schema, etc. etc.

Looking ahead.  If you can show example syntax of what kinds out outputs you might like from the X3D Object Model, am happy to help adapt the template stylesheet to autogenerate the goal output.

Thanks for considering the possibilities!  Onward we go.  8)

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160922/1e7c0a32/attachment.html>


More information about the x3d-public mailing list