[x3d-public] X3D JSON style sheet. ProtoInstances with USE don't get a name attribute

Don Brutzman brutzman at nps.edu
Mon Mar 14 15:33:59 PDT 2016


Thanks for asking.  Yes there is some partial redundancy of information here.  However...

Some time ago we decided to make the @name attribute required, even for USE.  This allows a player to perform strong checking of node type, just as is possible with any other USE node.

This approach also avoids single point of failure, where a mistaken spelling of DEF or USE might inadvertently insert a scene graph with the wrong node type somewhere into the scene graph.  Such a mistake has a high likelihood of creating a serious run-time error.  From that perspective, I suppose requiring @name for strong type checking also is helpful in maintaining scene security from attack.

Glad to hear that X3D Schematron confirmed the omission was erroneous!  8)

So please include @name field in your ProtoInstance, ProtoDeclare and ExternProtoDeclare output.  Also (Roy) please require it in the JSON Schema.  It is good that we are building consistent set of requirements and quality assurance (QA) into each of the encodings.


On 3/13/2016 7:24 AM, John Carlson wrote:
> See  that name attributes for ProtoInstances got removed when there’s USE in result file arc2.x3d in arc.son.  I can probably put them back in my PrototypeExpander, I am not sure. This causes Schematron to complain. You can fix Schematron too, if it’s an error.  Source is arc.x3d and intermediate is arc.json


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