[
Lists Home |
Date Index |
Thread Index
]
> Same for VRML and X3D. It has route structures. I tend to think of it as
> a network of objects, not a hierarchy. X3D has a hierarchy in the
> XML encoding because it has to have a root node. In the VRML, encoding,
> it doesn't. USE nodes provide, define one use everywhere functionality.
> There is a hierarchy of objects with some inheritance of properties, and
> to nest finite coordinate spaces. X3D like VRML likes a one pass parse.
I was actually thinking of bringing up a very similar example in SVG. In
SVG 1.1 you have a <use> element that can refer by id to a defined
graphic primitive. Certain attributes of the <use> are passed on to the
conceptual copy of the primitive (say a polyline). While this cuts down
on repeated data throughout the SVG document it is wildly complex to
process.
One must understand the notion of a conceptual graphic, a shadow tree,
and a realized version of the document when rendered. This is
exacerbated by interactivity-- when an object that was <use>d is clicked
you must find the conceptual node correlating to the position clicked,
then find the corresponding <use> element and ultimately pass a third
interface to the conceptual primitive using an SVGElementInstance.
Once you have all of that figured out you then have to worry about
mutation events in either the <use> or the element to which the <use> is
referring (i.e., both ends of the relationship must be monitored for
changes). This ultimately leads to a lot of jumping around in the
processing. It is confusing at best.
When working with <use> elements the first question I ask of document
creators is "Do you *really* need them".
I wasn't sure exactly how to tie this back to Roger's post-- so thanks
Len for giving me the stepping stone.
Cheers,
Jeff Rafter
|