<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 3/20/2016 6:08 PM, John Carlson
      wrote:<br>
    </div>
    <blockquote
      cite="mid:55624238-DF95-4D66-9D05-E2417F6AC33E@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      My limited understanding is that DEF defines an individual, and
      once a USE is used for that DEF, the string becomes a class of
      individuals (not in the class attribute).  I speak in more
      mathematical terms than precise definition in HTML/XML/X3D.</blockquote>
    <br>
    Of course it depends on the implementation, but the spec says
    (19775-1 4.4.3 -
    <a class="moz-txt-link-freetext" href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#DEFL_USESemantics</a>)
    "The USE statement does not create a copy of the node. Instead, the
    same node is inserted into the scene graph a second time, resulting
    in the node having multiple parents."<br>
    <br>
    So it's not a class of individuals, but multiple references to a
    single individual. X3D does not provide a mechanism to have a
    subclass (in the OOP sense) where different subclasses exhibit
    similar but not identical behavior. <br>
    <br>
    <br>
    Leonard Daly<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
      cite="mid:55624238-DF95-4D66-9D05-E2417F6AC33E@gmail.com"
      type="cite">
      <div class=""><br class="">
      </div>
      <div class="">John<br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On Mar 20, 2016, at 8:50 PM, Leonard Daly <<a
                moz-do-not-send="true" href="mailto:web3d@realism.com"
                class=""><a class="moz-txt-link-abbreviated" href="mailto:web3d@realism.com">web3d@realism.com</a></a>> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta content="text/html; charset=windows-1252"
                http-equiv="Content-Type" class="">
              <div bgcolor="#FFFFFF" text="#000000" class="">
                <div class="moz-cite-prefix">DEF/USE is not like
                  id/class. DEF and id are alike in that both define a
                  string that references exactly one node (element). USE
                  tells the parse to insert the defined node into the
                  X3D scene-graph at that location. The class attribute
                  defines a collection of classes that the node belongs
                  to. It is similar to adding (non-X3D) metadata to the
                  node for creating a compact reference to similar (but
                  generally not identical) nodes.<br class="">
                  <br class="">
                  X3DOM generates an 'id; for each DEF as per the XML
                  encoding specification (4.3.4). If the node is
                  Inlined, then each DEF is copied to 'id' with the
                  provided prefix and a separator (__ - double
                  underscore). There is an obvious advantage of have DEF
                  == id in that normal DOM referencing and other
                  libraries (jQuery, etc.) can use the same syntax and
                  coding structure. The USE field is an instruction to
                  the parse and scene builder to insert the previously
                  defined node at the current location in the scene
                  graph.<br class="">
                  <br class="">
                  <br class="">
                  Leonard Daly<br class="">
                  <br class="">
                  <br class="">
                  <br class="">
                </div>
                <blockquote
                  cite="mid:6E86F25B-1FA9-4527-AD62-77B5D249A936@gmail.com"
                  type="cite" class="">
                  <pre class="" wrap="">Class and id are separate ideas in HTML, and you can address id and class separately without addressing them together.  It seems to me that DEF/USE are intermixed ideas  that should be separated into class and id.   Thus the USEs reference a class of DEF, but then there’s no way of addressing the DEF individually.  I’ll let the experts decide.  I just would like the ability to use # and . and various CSS selectors for referencing X3D node w/o JavaScript necessarily.  If ROUTES had toNodes and fromNodes that would work.  Maybe there’s another way of doing it.  IDK.  We could add fromCSSSelectorNodes and toCSSSelectorNodes in ROUTEs for backward compatibility.  Seems like this is the prototype versus archetype argument, and prototypes win (DEF/USE), even though it may be more convoluted.  If the DEF can further be hidden without hiding the USEs, then we essentially have archetypes.

Basically, I find it difficult to read the spec and easier to read email in a conversational style.

I’m also okay, with allowing DEF to be a replacement for id, and using the class attribute for other stuff.  We’ll have figure out how to use a CSS selector to reference a DEF.  (probably with tag[DEF=…]

How do XSL selectors work?  Can we reference XSL selectors in X3D?  Thanks!

John
</pre>
                  <blockquote type="cite" class="">
                    <pre class="" wrap="">On Mar 20, 2016, at 5:33 PM, Don Brutzman <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:brutzman@nps.edu"><brutzman@nps.edu></a> wrote:

Obvious questions:

a. can DEF/USE simply be utilized instead?  First law of engineering: "if it isn't broken, don't fix it."

b. if DEF/USE cannot or ought not to be utilized, then how is is backwards compatibility handled?  This includes Inline content loaded into a parent scene.

c. what does X3DOM currently do?

d. what does Cobweb currently do?


On 3/20/2016 10:09 AM, John Carlson wrote:
</pre>
                    <blockquote type="cite" class="">
                      <pre class="" wrap="">I'll second the proposal.  Also I'd like to propose adding CSS selectors for values of the fromNode and toNode attributes on ROUTEs if not already in the standard.  Thus if you have a node with id="foo"  you could use a route with toNode="#foo".  Class attributes would work similarly for fan in fan out.

John

On Mar 20, 2016 11:23 AM, "Andreas Plesch" <<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a> <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:andreasplesch@gmail.com"><mailto:andreasplesch@gmail.com></a>> wrote:

   Since Don mentioned that nobody has proposed introducing an 'id' attribute, let me then propose adding an 'id' SFString attribute to all nodes for x3d 4.0.

   The reason is simply compatibility with the DOM on web pages in the case where x3d nodes are interpreted as DOM elements.

   Andreas
[...]
</pre>
                    </blockquote>
                    <pre class="" wrap="">all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://faculty.nps.edu/brutzman">http://faculty.nps.edu/brutzman</a>
</pre>
                  </blockquote>
                  <pre class="" wrap="">_______________________________________________
x3d-public mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>

</pre>
                </blockquote>
                <br class="">
                <br class="">
                <div class="moz-signature">-- <br class="">
                  <font class="tahoma,arial,helvetica san serif"
                    color="#333366"> <font class="" size="+1"><b
                        class="">Leonard Daly</b></font><br class="">
                    X3D Co-Chair<br class="">
                    Cloud Consultant<br class="">
                    President, Daly Realism - <i class="">Creating the
                      Future</i> </font></div>
              </div>
              _______________________________________________<br
                class="">
              x3d-public mailing list<br class="">
              <a moz-do-not-send="true"
                href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><br
                class="">
              <a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br
                class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <font class="tahoma,arial,helvetica san serif" color="#333366">
        <font size="+1"><b>Leonard Daly</b></font><br>
        X3D Co-Chair<br>
        Cloud Consultant<br>
        President, Daly Realism - <i>Creating the Future</i>
      </font></div>
  </body>
</html>