[x3d-public] setUSE in X3DJSAIL. Impact on X3DJSONLD.

Don Brutzman brutzman at nps.edu
Thu Jul 20 13:31:12 PDT 2017


On 7/20/2017 12:39 PM, Andreas Plesch wrote:
> 
> On Thu, Jul 20, 2017 at 3:13 PM, John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
> 
>     There is a node tree in X3DJSAIL.   There’s two parts to X3DJSAIL, jsail (the implementation) and sai (the interface)

correct, as are your other points.

There is some usage of DOM internally to the library, particularly when using Java reflection, but none of that is exposed to the programmer.

Conceivably we could add some form of DOM import and export for X3DJSAIL object trees.

	Conversions
	http://www.web3d.org/x3d/stylesheets/java/X3DJSAIL.html#Conversions

> Ok. I think sai (lowercase), the interface, defined in X3DJSAIL, is quite different from the SAI defined in the standard (abstract, java or javascript), right ?

Actually no...  I have implemented the X3D Java SAI interfaces quite strictly, and then added the jsail concrete classes using them.

Nevertheless have found a number of omissions and contradictions in the Java SAI language binding for X3D.  Issues list maintained on X3DJSAIL page at:

============================================================================
Specification Changes under Consideration
http://www.web3d.org/x3d/stylesheets/java/X3DJSAIL.html#SpecificationChanges

*  X3dJavaSpecificationChangesAndIssues.txt lists noted problems with the governing specification X3D Java SAI Language Bindings (ISO/IEC 19777-2).
    http://www.web3d.org/x3d/stylesheets/java/X3dJavaSpecificationChangesAndIssues.txt

*  Specification prose is needed to define necessary support for DEF, USE and class attributes.
*  Consider appropriate specification issues for abstract SAI and corresponding encoding specifications.
*  Not needed: adding Annex D Java SAI Concrete Classes for standalone scene programming, since other approaches can be accomplished compatibly.
*  Mantis issue tracker keeps track of details, alternatives and resolution for each specification issue.
*  Web3D Consortium github (member-only access) is used to maintain editors-draft Web3D specifications in version control.
============================================================================

> My mental model currently is: Use X3DJSAIL to conveniently compose and manage an (X3D looking) object graph (a 'scene'). The object graph can be serialized (written out) to XML (strings). The XML is processed by the X3D browser to an internal scene graph with state. Use SAI to directly manipulate the internal scene graph. Does that sound right ?

Yes.

Additional output encodings are also available: VRML97 .wrl, ClassicVRML .x3dv, JSON .json, X3DOM.xhtml and Cobweb.html files/strings.  Expecting to add others in the future.

> Hoping to clarify and avoid misunderstandings,
> 
> -Andreas

Yes great and thanks.  8)

>     __
> 
>     *From: *John Carlson <mailto:yottzumm at gmail.com>
>     *Sent: *Thursday, July 20, 2017 2:39 PM
>     *To: *Andreas Plesch <mailto:andreasplesch at gmail.com>; X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
>     *Subject: *RE: [x3d-public] setUSE in X3DJSAIL. Impact on X3DJSONLD.
> 
>     __ __
> 
>     As far as I know, there is no DOM in X3DJSAIL except for processing XML input into the “scene” through reflection as defined with typesafe instances of concrete classes (not in SAI, but likely implementations of SAI).   XML output is done with strings.____
> 
>     __ __
> 
>     Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10____
> 
>     __ __
> 
>     *From: *Andreas Plesch <mailto:andreasplesch at gmail.com>
>     *Sent: *Thursday, July 20, 2017 2:35 PM
>     *To: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
>     *Subject: *Re: [x3d-public] setUSE in X3DJSAIL. Impact on X3DJSONLD.____
> 
>     __ __
> 
> 
>         Date: Thu, 20 Jul 2017 12:18:53 -0400
>         From: John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>>
> 
>         As far as I know, there is no ?parents? property on a node in DOM, so this whole discussion is rather moot until that changes. If you don?t have parents, then there?s no way to get to one or more of your parents from a child node (not necessarily needed, but?)____
> 
>     __ __
> 
>     There is parentNode:____
> 
>     __ __
> 
>     https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode <https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode>____

Yes DOM parent node references are certainly helpful when walking/inspecting/changing a DOM tree.

Authoritative reference:

W3C DOM4, W3C Recommendation 19 November 2015
4.2.3 Interface ParentNode

https://www.w3.org/TR/dom/#interface-parentnode

>     __ __
> 
>     But the property is readonly because there can be only one parent for a node.____
> 
>     __ __
> 
>     x3dom/cobweb do not use the DOM for storing the x3d scene graph. They use javascript objects, for this reason among others. Additionally, there is a SAI service importDOM (or so) to help with bridging.____
> 
>     __ __
> 
>     I am not sure if I am following the discussion completely. One key seems to be to be careful in distinguishing in nomenclature (and praxis) the abstract scene graph (including the runtime state) - accessible via standardized SAI - from the (XML) node tree. Is perhaps X3DJSAIL a bit of a misnomer somewhat conflating SAI services with node tree manipulation ?____
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



More information about the x3d-public mailing list