[x3d-public] [x3d] Use of containerField in V4+

Roy Walmsley roy.walmsley at ntlworld.com
Tue Dec 15 14:22:10 PST 2015


When I said that I thought the containerField was "broke", I was not
referring to the concept in itself. I believe that it is the "correct"
approach to take. Technically, SFNode/MFNode fields are attributes, not
elements, to use XML terminology. Only nodes (and statements plus a few
other constructs) are elements. The containerField is an additional
attribute that is, as noted, only actually required when it differs from the
default. This has the benefit of making XML the most easily readable
encoding, minimizing the use of punctuation marks such as brackets.

My discussion on the concept of "broke" was specifically referring to the
implementation in the Schema, and then, only to four particular nodes. It
was the elimination of these issues with these four nodes which led me to
suggest an alternative implementation strategy in the Schema, the objective
being improved consistency between the Schema and the abstract
specification.

Regards,

Roy

-----Original Message-----
From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Don
Brutzman
Sent: 15 December 2015 12:09
To: Leonard Daly
Cc: X3D Graphics public mailing list; 'x3D WG'
Subject: Re: [x3d-public] [x3d] Use of containerField in V4+

On 12/15/2015 3:54 AM, Don Brutzman wrote:
> containerField describes a node's relationship to its parents.  The
default values are typically not needed by authors or generators.
>
> Debate on this topic was a lengthy effort a long time ago. Wrapper tags
only simplify rare occurrences,such as Collision node children,
distinguishing between a 'proxy' Shape and 'children' Shape nodes.
>
> Extensive reasons against wrapper tags in the XML encoding can be 
> found in 
> http://www.web3d.org/x3d/content/examples/Basic/development/WrapperTag
> sConsideredHarmful.html
>
> As a result we have a much terser XML encoding with corresponding
reductions in file size, transfer times and scene loading.

The example scene referred to in that page was moved and renamed when
archived.  Updated links:

http://www.web3d.org/x3d/content/examples/Basic/development/WrapperTagsExamp
leWrapped.html
http://www.web3d.org/x3d/content/examples/Basic/development/WrapperTagsExamp
leUnwrapped.html

http://www.web3d.org/x3d/content/examples/Basic/development/#WrapperTagsExam
ple

Reviewing  this example, it appears that the metrics are understated by half
because only the open-element wrapper tags.  So instead of a scene with 34
node tags needing 35 wrapper tags, it would need 70 open+close wrapper tags
added.

So use of wrapper tags triples the number of XML elements needed to express
an X3D scene.  No thanks.

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

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org




More information about the x3d-public mailing list