<p dir="ltr"><div class="gmail_chip gmail_drive_chip" style="width:100%;min-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);max-width:375px">
    <a href="https://drive.google.com/file/d/0B7SWdIIE8ueKYkhZNTlramd1bWxyYTZVUmYyZnhFU2pTMUdF/view?usp=drivesdk" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank">
        <img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png">
         
        <span style="color:#15c;text-decoration:none;vertical-align:bottom">arc.json</span>
    </a>
</div>roy can you test this file against X3D JSON Schema.  I believe if it  complains about a missing @name attribute in the ProtoInstance, there's a problem with the X3dToJson.xslt stylesheet removing the name attribute on a ProtoInstance with a USE attribute (unless someone fixed it in the meantime...I think my original message wasn't clear.)    I can provide a source .x3d file.  The source file is somewhat questionable, but it passed QA tests last time I checked.  You may want to construct your own example.  I'll post my source file in a follow up message.  I am operating on my phone right now, so it's hard to view json and x3d text files.  I am attaching from Google drive from a previous message.</p>
<div class="gmail_quote">On Mar 14, 2016 6:57 PM, "Roy Walmsley" <<a href="mailto:roy.walmsley@ntlworld.com">roy.walmsley@ntlworld.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Don,<br>
<br>
I checked the JSON schema - it already required the @name field for ProtoDeclare and ExternProtoDeclare. However, it was optional for ProtoInstance. I  have now made it required, and committed the change to SourceForge.<br>
<font color="#888888"><br>
Roy<br>
</font><div class="elided-text"><br>
-----Original Message-----<br>
From: Don Brutzman [mailto:<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>]<br>
Sent: 14 March 2016 22:34<br>
To: John Carlson; Roy Walmsley<br>
Cc: X3D Graphics public mailing list<br>
Subject: Re: X3D JSON style sheet. ProtoInstances with USE don't get a name attribute<br>
<br>
Thanks for asking.  Yes there is some partial redundancy of information here.  However...<br>
<br>
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.<br>
<br>
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.<br>
<br>
Glad to hear that X3D Schematron confirmed the omission was erroneous!  8)<br>
<br>
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.<br>
<br>
<br>
On 3/13/2016 7:24 AM, John Carlson wrote:<br>
> 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<br>
<br>
<br>
all the best, Don<br>
--<br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   <a href="tel:%2B1.831.656.2149" value="+18316562149">+1.831.656.2149</a><br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
</div></blockquote></div>