<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Kristian & Max,<br>
<br>
Kristian, this is a good question. I agree with Max that removing
the DEFed node invalidates the USE. In the strict sense, this
should generate a fatal error because of the inability to render
an object. <br>
<br>
However, that may not be the desirable behavior in user
(especially browser) code. It may be the case that the particular
node is being replaced and it is necessary to delete it before the
new one can be created. Possible solutions are:<br>
<br>
1) Continue to use the old definition, but do not allow new
instances of the deleted node. If a new node is created with the
old DEF name, then any new references use the new definition. This
is similar to a Unix file system that removes directory entries
for deleted files, but retains the contents while the file is
open.<br>
<br>
2) Throw an error and (unless the error is caught) terminate
because the reference is no longer valid. This is very friendly to
developers, but not so for users.<br>
<br>
3) Generate a non-fatal error, but then you still need to decide
what to do about rendering.<br>
<br>
<br>
Along these lines what should (not necessary does) happen in
Kristian example when the DEF and USE nodes are currently not
being rendered (perhaps out of view) and the DEF node is deleted,
then a new node using the same DEF name is created. When the USE
node returns to the view, should the system:<br>
1) Rendered as its initial state (like (1) above)<br>
2) Rendered as the new DEF node<br>
3) Generate error at some point between the original DEF node
being deleted and USE coming into view (like (2) above).<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
</div>
<blockquote cite="mid:552E435C.9070700@igd.fraunhofer.de"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
Dear Kristian,<br>
<br>
thanks for letting us know that this doesn't behave correctly in
X3DOM right now (opened a ticket: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://github.com/x3dom/x3dom/issues/489">https://github.com/x3dom/x3dom/issues/489</a>),
and thanks for pointing out this open issue.<br>
<br>
I also feel that solution 1 (removing the DEFed node invalidates
USEs, nothing rendered) is the cleanest way of solving this.<br>
<br>
Regards,<br>
Max<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 15.04.2015 12:38, Kristian Sons
wrote:<br>
</div>
<blockquote cite="mid:552E3F93.7030704@dfki.de" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Dear X3D community,<br>
<br>
although this is a question concerncing the X3DOM integration
model, I post this quesion to the X3D mailing list, because I
know that the consortium is really interested in adopting this
integration model in a future version of X3D.<br>
<br>
I am be interested in the intended behavior when synchronization
between the DOM representation and internal X3D scene graph is
necessary. The X3DOM paper is not really explicit here.<br>
<br>
Let me use the simple DEF/USE example from x3dom.org as example:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://examples.x3dom.org/example/x3dom_defUse.xhtml">http://examples.x3dom.org/example/x3dom_defUse.xhtml</a><br>
<br>
The scene has to <Shape> nodes, one defining the Shape
below Transform#bar, one that is reusing the Shape below
Transform#bar.<br>
<br>
Now I remove the defining node (using jQuery syntax):<br>
<span style="color: rgb(34, 34, 34); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important;
float: none; background-color: rgb(255, 255, 255);">$("Transform#bar
Shape").remove();</span><br>
<br>
Now I have an invalid X3D scene in the DOM with a single
<Shape> node pointing to a definition that does not
exists. The currently included X3DOM implementation 1.6.2-dev
produces an error, stops rendering (displaying both shapes) and
gets inactive (I guess this is a bug) . Former versions would
just render the "USE" node using the previous definition.<br>
<br>
What the intended behavior? I could think of three behaviors:<br>
<br>
1. The USE node has a dangling reference. Consequently nothing
is rendered at all (corresponds to a reinitialization of the
scene state based on the new DOM representation)<br>
2. The USE node becomes the DEF node (the DOM corresponds to
removing the node via SAI and then serializing the scene)<br>
3. The USE node is still rendering the referenced shape but the
definition does not appear in the DOM (the run-time corresponds
to removing the node via SAI, but the DOM representation
differs)<br>
<br>
The first behavior seems the most logical variant for me. <br>
<br>
Any opinions on this?<br>
<br>
Thanks,<br>
Kristian<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
_______________________________________________________________________________
Kristian Sons
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH, DFKI
Agenten und Simulierte Realität
Campus, Geb. D 3 2, Raum 0.77
66123 Saarbrücken, Germany
Phone: +49 681 85775-3833
Phone: +49 681 302-3833
Fax: +49 681 85775–2235
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:kristian.sons@dfki.de">kristian.sons@dfki.de</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.xml3d.org">http://www.xml3d.org</a>
Geschäftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
_______________________________________________________________________________</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<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>
</pre>
</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>