<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii"><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:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        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:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoPlainText>Hi,<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><ol style='margin-top:0cm' start=1 type=1><li class=MsoPlainText style='margin-left:0cm;mso-list:l0 level1 lfo1'>6.4.10 namedNodeHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#NamedNodeHandling">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#NamedNodeHandling</a><o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l0 level1 lfo1'>6.4.12 protoDeclarationHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ProtoDeclarationHandling">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ProtoDeclarationHandling</a><o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l0 level1 lfo1'>6.4.14 externprotoDeclarationHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExternProtoDeclarationHandling">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ExternProtoDeclarationHandling</a><o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l0 level1 lfo1'>6.4.17 dynamicRouteHandling, see <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#DynamicRouteHandling">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#DynamicRouteHandling</a><o:p></o:p></li></ol><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Each of these services is an execution context services.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>What is an execution context? This is detailed in clause 4.4.10 Execution context.<o:p></o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Does this permit us to add any of these statements at any location in the scene or name scope?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText>Reference: <a href="http://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/OrigamiCranesIndex.html">http://x3dgraphics.com/examples/X3dForAdvancedModeling/Animation/OrigamiCranesIndex.html</a><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>In this example we have ROUTEs as children of a Group node.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><ol style='margin-top:0cm' start=1 type=A><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>createScene, to create an empty scene<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>… to add any header info, and META statements, for example<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>rootNodeHandling, to add the first root node, Background<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>rootNodeHandling, to add the second root node, NavigationInfo<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>rootNodeHandling, to add the third root node, PointLight<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>rootNodeHandling, to add the fourth root node, PointLight<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>rootNodeHandling, to add the fifth root node, Group<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>getField, to get the “children” field of the Group node<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>setValue, to add the first child to the children field of the Group node, Viewpoint<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>setValue, to add the second child to the children field of the Group node, TimeSensor<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>setValue, to add the third child to the children field of the Group node, PositionInterpolator<o:p></o:p></li><li class=MsoPlainText style='margin-left:0cm;mso-list:l1 level1 lfo2'>????, to add the “fourth child” to the children field of the Group node, ROUTE<o:p></o:p></li></ol><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>All the best,<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Roy<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-US 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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Great analysis, thanks for performing and sharing Roy.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Based on their functionality, we might also consider placing<o:p></o:p></p><p class=MsoPlainText>-  IMPORT/AS within the corresponding Inline, and<o:p></o:p></p><p class=MsoPlainText>- EXPORT at the top level of a scene<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>On 7/14/2017 8:45 AM, Roy Walmsley wrote:<o:p></o:p></p><p class=MsoPlainText>> Hi,<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> We were recently discussing the permitted placement of the following statements:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ROUTE<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> IMPORT<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> EXPORT<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> PROTODECLARE<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> EXTERNPROTODECLARE<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Let’s take a look at what is permitted by these encodings, and also compare what the abstract standard says.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> mar.html#General<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> A non-terminal “statement” is defined as:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /nodeStatement/|<o:p></o:p></p><p class=MsoPlainText>> /importStatement/ |<o:p></o:p></p><p class=MsoPlainText>> /exportStatement /|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /protoStatement/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /routeStatement/;<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> The non-terminal “nodeStatement” can be followed down to “node”, “nodeBody”, and “nodeBodyElement”. This last non-terminal has the definition:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /initializeOnlyId fieldValue/|<o:p></o:p></p><p class=MsoPlainText>> /inputOutputId fieldValue |/<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /initializeOnlyId /*IS*/initializeOnlyId/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /inputOnlyId /*IS*/inputOnlyId/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /outputOnlyId /*IS*/outputOnlyId/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /inputOutputId /*IS*/inputOutputId/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /routeStatement/|<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> /protoStatement/;<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Notice the lack or importStatement and exportStatement.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> This has been pointed out previously. In fact, Mantis issue 698 covers this very point.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> dingOfNodes.html#Group<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Notice that this Node has a content model denoted by <o:p></o:p></p><p class=MsoPlainText>> “ChildContentModel”. The description of this is given in 6.3.3 <o:p></o:p></p><p class=MsoPlainText>> ChildContentModel<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> dingOfNodes.html#ChildContentModel<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> We should also note the text in 6.3.5 ChildContentModelSceneGraphStructure.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> dingOfNodes.html#ChildContentModelSceneGraphStructure<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Turning to the XML schema V3.3 now.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:complexContent><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:extensionbase="X3DChildNode"><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:sequenceminOccurs="0"maxOccurs="unbounded"><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:annotation><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:documentation>children</xs:documentation><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> </xs:annotation><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:groupref="ChildContentModel"minOccurs="0"maxOccurs="unbounded"/><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:groupref="ChildContentModelSceneGraphStructure"minOccurs="0"maxOcc<o:p></o:p></p><p class=MsoPlainText>> urs="unbounded"/><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> </xs:sequence><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:attributename="bboxCenter"type="SFVec3f"default="0 0 0"/><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <xs:attributename="bboxSize"type="boundingBoxSizeType"default="-1 -1 <o:p></o:p></p><p class=MsoPlainText>> -1"/><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> </xs:extension><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> </xs:complexContent><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  1. In the definition of X3DGroupingNode  2. In the definition of the <o:p></o:p></p><p class=MsoPlainText>> content model group ChildContentModelSceneGraphStructure<o:p></o:p></p><p class=MsoPlainText>>  3. In the definition of the content model group <o:p></o:p></p><p class=MsoPlainText>> GroupingNodeChildContentModel  4. In the definition of the content <o:p></o:p></p><p class=MsoPlainText>> model group SceneGraphFragmentWithPrototypeDeclarationsContentModel<o:p></o:p></p><p class=MsoPlainText>>  5. In the definition of the StaticGroup node  6. In the definition of <o:p></o:p></p><p class=MsoPlainText>> the GeoLOD node<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> The GroupingNodeChildContentModel is only used in the definition of the Scene element.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> So, we see that in the XML schema these statements are only permitted in grouping nodes.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> onents/core.html#ROUTEStatement<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> onents/core.html#PROTOStatement<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> onents/core.html#EXTERNPROTOStatement<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> All three of these clauses have the words “xxxxxx statements may appear anywhere in the file”<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Now look at 9.2.5 IMPORT statement, and 9.2.6 EXPORT statement.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> onents/networking.html#IMPORTStatement<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Reference: <o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> onents/networking.html#EXPORTStatement<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Neither of these clauses has any comment on the placement within the file.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> So, what do we conclude?<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  1. ROUTEs and prototypes are permitted anywhere.<o:p></o:p></p><p class=MsoPlainText>>  2. IMPORT and EXPORT need a statement on placement in the abstract <o:p></o:p></p><p class=MsoPlainText>> standard<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> If we assume that A) is correct, then:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  3. In the XML encoding the content models need to be amended to <o:p></o:p></p><p class=MsoPlainText>> permit placement of these statements anywhere  4. In the Classic VRML <o:p></o:p></p><p class=MsoPlainText>> encoding the grammar needs to be amended<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> All the best,<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Roy<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>> x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText>> <a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>> <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></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>all the best, Don<o:p></o:p></p><p class=MsoPlainText>-- <o:p></o:p></p><p class=MsoPlainText>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></p><p class=MsoPlainText>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<o:p></o:p></p><p class=MsoPlainText>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></p></div></body></html>