<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1402169005;
        mso-list-type:hybrid;
        mso-list-template-ids:-964256654 134807569 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:1865092411;
        mso-list-type:hybrid;
        mso-list-template-ids:-398967690 1690435808 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l1:level1
        {mso-level-number-format:alpha-upper;
        mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Roy,</p><p class=MsoNormal><br>I know little of SAI, and know more of X3DJSAIL.  X3DJSAIL jsail uses addChild().  I think X3DJSAIL sai (SAI) uses addChildren().  See attached ROUTEObject code in X3DJSAIL (Java) for example of jsail package. Thus Group and Transform have addChildren() in SAI (see org.web3d.x3d.sai package in X3DJSAIL). The difference between addChild and addChildren is the return type I believe.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hope this helps!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Sent: </b>Sunday, July 16, 2017 9:04 AM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">'X3D Graphics public mailing list'</a><br><b>Subject: </b>Re: [x3d-public] Statement permitted placements</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-GB>Hi,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>I know that there have been postings where the subject line was amended to "IMPORT/EXPORT Use [was: Statement permitted placements]". However, I want to continue with further observations on the more general theme.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>I was thinking about the next stage of the C++/C# language binding work, when I realised that I  needed to look at the SAI, as defined in ISO/IEC 19775-2 V3.3, and see how that aligned with my general findings on statement placing. So, let's take a look.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Reviewing the general layout of ISO/IEC 19775-2 V3.3 we see that the only clause with sufficient detail to pursue this topic is clause 6 Services reference.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Reference: <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html</a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>What services are relevant? Let's concentrate on those services that would allow us to insert one of these statements (ROUTE, IMPORT, EXPORT, PROTODECLARE, EXTERNPROTODECLARE) into the scene graph. We have the following, and only the following:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><ol style='margin-top:0in' start=1 type=1><li class=MsoNormal style='margin-left:0in;mso-list:l0 level1 lfo1'><span lang=EN-GB>6.4.10 namedNodeHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#NamedNodeHandling"><span style='color:#0563C1'>http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#NamedNodeHandling</span></a><o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l0 level1 lfo1'><span lang=EN-GB>6.4.12 protoDeclarationHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ProtoDeclarationHandling"><span style='color:#0563C1'>http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ProtoDeclarationHandling</span></a><o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l0 level1 lfo1'><span lang=EN-GB>6.4.14 externprotoDeclarationHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExternProtoDeclarationHandling"><span style='color:#0563C1'>http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExternProtoDeclarationHandling</span></a><o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l0 level1 lfo1'><span lang=EN-GB>6.4.17 dynamicRouteHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#DynamicRouteHandling"><span style='color:#0563C1'>http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#DynamicRouteHandling</span></a><o:p></o:p></span></li></ol><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Each of these services is an execution context services.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>What is an execution context? This is detailed in clause 4.4.10 Execution context.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Reference: <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/concepts.html#ExecutionContext">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/concepts.html#ExecutionContext</a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>The first part of the descriptive text reads “An execution context is the run-time semantic equivalent to a name scope described in <i>4.4.7 Run-time name scope</i> in <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/references.html#[I19775_1]">ISO/IEC 19775-1</a>. It provides a way of containing and firewalling internal interaction code in such a manner as to represent the same restrictions that a name space provides in the file format.”.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Does this permit us to add any of these statements at any location in the scene or name scope?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>We find that the text gives no indication of where these are added. Furthermore, it does not provide any way to add these as “children” of a specific node.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>So we need to consider not only the abstract standard 19775-1 and the encodings in 19776, but also the SAI in 19775-2, propagating down to the language bindings in 19777.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>It might be useful to look at an example here, and try to use the SAI from one of the language bindings to build up a scene node by node programmatically, and create an instance of a scene in memory that has these statements scattered about. A fairly straightforward example  using ROUTEs is the Origami Cranes example, which can be found in the X3D Example Archives, X3D for Advanced Modeling, Animation section.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Reference: <a href="http://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/OrigamiCranesIndex.html">http://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/OrigamiCranesIndex.html</a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>In this example we have ROUTEs as children of a Group node.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>How might we proceed to create this example. Here is one attempt at a solution. This solution is not intended to be efficient, merely to illustrate a step by step approach.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><ol style='margin-top:0in' start=1 type=A><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>createScene, to create an empty scene<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>… to add any header info, and META statements, for example<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>rootNodeHandling, to add the first root node, Background<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>rootNodeHandling, to add the second root node, NavigationInfo<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>rootNodeHandling, to add the third root node, PointLight<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>rootNodeHandling, to add the fourth root node, PointLight<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>rootNodeHandling, to add the fifth root node, Group<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>getField, to get the “children” field of the Group node<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>setValue, to add the first child to the children field of the Group node, Viewpoint<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>setValue, to add the second child to the children field of the Group node, TimeSensor<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>setValue, to add the third child to the children field of the Group node, PositionInterpolator<o:p></o:p></span></li><li class=MsoNormal style='margin-left:0in;mso-list:l1 level1 lfo2'><span lang=EN-GB>????, to add the “fourth child” to the children field of the Group node, ROUTE<o:p></o:p></span></li></ol><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Here we have a difficulty. Set “setValue” service may be an SAINode value. There is an SAI type of SAIRoute, described in 5.2.29.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Reference: <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/dataRef.html#SAIRoute">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/dataRef.html#SAIRoute</a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>The text quite clearly states “A ROUTE is not a node in the scene graph …”. So we can’t use setValue again.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>The only service available to us is 6.4.17 dynamicRouteHandling. We pass the executionContext (which in this example is the scene), ROUTE properties, and “AddRoute” action. Where will it go? How do we specify we want it to be added to the Group node as the next child?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>All the best,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Roy<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span style='mso-fareast-language:EN-GB'>-----Original Message-----<br>From: Don Brutzman [mailto:brutzman@nps.edu] <br>Sent: 14 July 2017 18:19<br>To: Roy Walmsley <roy.walmsley@ntlworld.com>; 'X3D Graphics public mailing list' <x3d-public@web3d.org><br>Subject: Re: [x3d-public] Statement permitted placements</span><span lang=EN-GB><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Great analysis, thanks for performing and sharing Roy.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Based on their functionality, we might also consider placing<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>-  IMPORT/AS within the corresponding Inline, and<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>- EXPORT at the top level of a scene<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>However, we should be wary about that.  Since scenes can be constructed programmatically, a tool might append an IMPORT or EXPORT at run time at other places in the scene graph.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>We probably should also be deliberate whether to allow statements like (EXTERN)PROTODECLARE, ROUTE, IMPORT/EXPORT inside of Appearance and other non-children kinds of locations.  Doesn't necessarily have to be there, but let's be consistent across encodings.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>On 7/14/2017 8:45 AM, Roy Walmsley wrote:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Hi,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> We were recently discussing the permitted placement of the following statements:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> ROUTE<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> IMPORT<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> EXPORT<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> PROTODECLARE<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> EXTERNPROTODECLARE<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> The original discussion centred on the draft JSON encoding. However, I have now been looking at this in the XML and Classic VRML encodings.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Let’s take a look at what is permitted by these encodings, and also compare what the abstract standard says.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Let’s take the Classic VRML encoding first, i.e. ISO/IEC 19776-2 V3.3. The most comprehensive description is the grammar in Annex A.2.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/gram"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/gram</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> mar.html#General<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> A non-terminal “statement” is defined as:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /nodeStatement/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /importStatement/ |<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /exportStatement /|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /protoStatement/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /routeStatement/;<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> The non-terminal “nodeStatement” can be followed down to “node”, “nodeBody”, and “nodeBodyElement”. This last non-terminal has the definition:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /initializeOnlyId fieldValue/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /inputOutputId fieldValue |/<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /initializeOnlyId /*IS*/initializeOnlyId/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /inputOnlyId /*IS*/inputOnlyId/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /outputOnlyId /*IS*/outputOnlyId/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /inputOutputId /*IS*/inputOutputId/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /routeStatement/|<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> /protoStatement/;<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Notice the lack or importStatement and exportStatement.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> This has been pointed out previously. In fact, Mantis issue 698 covers this very point.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <a href="http://www.web3d.org/member-only/mantis/view.php?id=698"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/member-only/mantis/view.php?id=698</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Now let’s take the XML encoding, ISO/IEC 19776-1 V3.3. Let’s look at an example node, say Group, defined at 6.2.81.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> dingOfNodes.html#Group<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Notice that this Node has a content model denoted by <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> “ChildContentModel”. The description of this is given in 6.3.3 <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> ChildContentModel<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> dingOfNodes.html#ChildContentModel<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> The text states: “ChildContentModel is the child-node content model corresponding to X3DChildNode, combining all profiles. ChildContentModel can contain most nodes, other Grouping nodes, Prototype declarations and ProtoInstances in any order and any combination.”. Note that there is no mention of ROUTES, or IMPORT/EXPORT.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> We should also note the text in 6.3.5 ChildContentModelSceneGraphStructure.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Enco</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> dingOfNodes.html#ChildContentModelSceneGraphStructure<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> This states “Child-node content model corresponding to SceneGraphStructure elements, which are not specific X3D nodes. These are ProtoDeclare, ExternProtoDeclare, IMPORT, EXPORT or ROUTE statements.”. This content model covers all the statements of interest. Where is it used? This content model is not listed in any  node definition. In fact, it is not mentioned anywhere else in the standard.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Turning to the XML schema V3.3 now.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <a href="http://www.web3d.org/specifications/x3d-3.3.xsd"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/specifications/x3d-3.3.xsd</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Looking at the “Group” node, we see that the content model is derived from X3DGroupingNode. Looking at the definition for X3DGroupingNode, the following definition can be extracted:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:complexContent><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:extensionbase="X3DChildNode"><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:sequenceminOccurs="0"maxOccurs="unbounded"><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:annotation><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:documentation>children</xs:documentation><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> </xs:annotation><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:groupref="ChildContentModel"minOccurs="0"maxOccurs="unbounded"/><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:groupref="ChildContentModelSceneGraphStructure"minOccurs="0"maxOcc<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> urs="unbounded"/><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> </xs:sequence><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:attributename="bboxCenter"type="SFVec3f"default="0 0 0"/><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <xs:attributename="bboxSize"type="boundingBoxSizeType"default="-1 -1 <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> -1"/><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> </xs:extension><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> </xs:complexContent><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> So any node derived from X3DGroupingNode will be passed as valid of it has any of the statements we are considering. Where else if this content model used? The XML schema has six instances of this term, as follows:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  1. In the definition of X3DGroupingNode  2. In the definition of the <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> content model group ChildContentModelSceneGraphStructure<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  3. In the definition of the content model group <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> GroupingNodeChildContentModel  4. In the definition of the content <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> model group SceneGraphFragmentWithPrototypeDeclarationsContentModel<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  5. In the definition of the StaticGroup node  6. In the definition of <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> the GeoLOD node<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> The GroupingNodeChildContentModel is only used in the definition of the Scene element.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> So, we see that in the XML schema these statements are only permitted in grouping nodes.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Finally, let us turn to the abstract standard ISO/IEC 19775-1 V3.3. What does it tell us about the placements of statements. There is no general text covering all the statements, so we need to look at each one in turn. We will start with ROUTEs and Prototypes, 7.2.5.7 ROUTE statement, 7.2.5.8 PROTO statement, and 7.2.5.9 EXTERNPROTO statement.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> onents/core.html#ROUTEStatement<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> onents/core.html#PROTOStatement<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> onents/core.html#EXTERNPROTOStatement<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> All three of these clauses have the words “xxxxxx statements may appear anywhere in the file”<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Now look at 9.2.5 IMPORT statement, and 9.2.6 EXPORT statement.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> onents/networking.html#IMPORTStatement<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Reference: <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp"><span style='color:windowtext;text-decoration:none'>http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> onents/networking.html#EXPORTStatement<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Neither of these clauses has any comment on the placement within the file.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> So, what do we conclude?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  1. ROUTEs and prototypes are permitted anywhere.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  2. IMPORT and EXPORT need a statement on placement in the abstract <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> standard<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> If we assume that A) is correct, then:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>>  3. In the XML encoding the content models need to be amended to <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> permit placement of these statements anywhere  4. In the Classic VRML <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> encoding the grammar needs to be amended<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Of course, we might want to restrict the usage, in which case these needs proper definition in the abstract standard, and propagation to the encodings.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> All the best,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> Roy<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> _______________________________________________<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> x3d-public mailing list<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-GB>all the best, Don<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>-- <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu"><span style='color:windowtext;text-decoration:none'>brutzman@nps.edu</span></a><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-GB>X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman"><span style='color:windowtext;text-decoration:none'>http://faculty.nps.edu/brutzman</span></a><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>