[x3d-public] id attribute proposal

John Carlson yottzumm at gmail.com
Sun Mar 20 15:01:03 PDT 2016


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
> On Mar 20, 2016, at 5:33 PM, Don Brutzman <brutzman at nps.edu> 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:
>> 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" <andreasplesch at gmail.com <mailto:andreasplesch at gmail.com>> 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
>> [...]
> 
> 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