[x3d-public] Replacing USE with DEF
John Carlson
yottzumm at gmail.com
Fri Mar 27 21:08:24 PDT 2026
Sure, for XML you at least need ID. I’m not convinced you need IDREF if
you can use a directed acyclic graph in memory. Unfortunately, single
parent fields are required for XML DOM and HTML DOM. I guess no one thinks
to look up ID (USE) by object reference. Actually object-capabilities are
probably preferred, which can be integers on some systems. On the wire,
you may want to distinguish ID from IDREF, but I’m unclear on technical
reasons. Why? Why not use ID everywhere and replace it with an object
reference from a bidirectional map? Or just store 2 lookup tables? If it
refers to the same node/object, use the same ID!
If you consider DOM only as an I/O mechanism, things get much simpler.
Furthermore, glTF uses array indexes everywhere. Not that I agree with it,
it just shows USE is not required technically. Yes, indexes and lookup
tables are required if you don’t have USE, but AFAIK, USE requires a lookup
table as well. Unless you’re going to search the whole scenegraph for the
DEF. Ouch!
John
On Fri, Mar 27, 2026 at 8:22 PM Don Brutzman <don.brutzman at gmail.com> wrote:
> It is not possible to avoid USE, it is fully integrated functionality in
> the specification. No need to reengineer the specification.
>
> Again recommend working on one very simple case at a time, to narrow down
> each problem and fix it. Complexity obscures diagnosis.
>
> all the best, Don
> --
> X3D Graphics, Maritime Robotics, Distributed Simulation
> Relative Motion Consulting https://RelativeMotion.info
>
>
> On Fri, Mar 27, 2026 at 6:08 PM John Carlson via x3d-public <
> x3d-public at web3d.org> wrote:
>
>> Replacing USE with DEF would massively improve the JSON schema. I vote
>> for that! It would massively improve the error reporting as well.
>>
>> What does FreeWRL think?
>>
>> No need for two attributes for the same meaning.
>>
>> USE and DEF code be used interchangeably, and container fields could
>> specify parents.
>>
>> The only problem I see is when USE and DEF are used together, but that’s
>> already an issue.
>>
>> John
>>
> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260327/f5c6d1df/attachment.html>
More information about the x3d-public
mailing list