<div dir="auto"><div><br><br><div data-smartmail="gmail_signature">---on the phone---</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 30, 2020, 10:17 PM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you very much for error reports.<br>
<br>
On 11/29/2020 1:27 PM, Andreas Plesch wrote:<br>
> <br>
> Validator complaints:<br>
> <br>
> A: PigCompliant.x3d<br>
> <br>
> 7. Schematron check<br>
> <br>
> <ProtoInstance DEF="" USE="ThePig" name="Pig"/> includes unnecessary attribute name='Pig' which is not permitted for ProtoInstance USE node [/X3D/Scene/Transform/ProtoInstance, error]<br>
> <br>
> Well, the name attribute actually is permitted, at least in the spec., since ProtoInstance is not a x3d node by itself. Not sure why the validator claims it is not permitted. In addition, I think name should be allowed ( ideally required but not possible due to backward compatibility ).<br>
<br>
Hmmm. Well since ProtoInstance acts like a node instance, I do treat it as such...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">ProtoInstance by itself is meaningless. Protoinstance together with a name does instantiate a x3d node.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
A statement like "having a name is optional" makes little sense, and even if not incorrect at the moment, change can easily lead to an error if any of the 4 DEF, USE or name values change, so the validator (X3D Schematron) doesn't allow it.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">On the contrary, a concept of strictness may require to have a name attribute with USE to allow for redundancy in validation, in the same way regular X3D USE nodes need to match their DEF type.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Strictness is good. Also follows an important design principle:<br>
<br>
* Wikipedia: Don't repeat yourself (DRY)<br>
<a href="https://en.wikipedia.org/wiki/Don't_repeat_yourself" rel="noreferrer noreferrer" target="_blank">https://en.wikipedia.org/wiki/Don't_repeat_yourself</a><br>
<br>
> B: PigNoName.x3d<br>
> <br>
> 7. Schematron check<br>
> <br>
> <Sound DEF=''/> minBack='40' maxBack='100' has minBack value greater than maxBack value [/X3D/Scene/ProtoDeclare/ProtoBody/Group/Sound, error] <Sound DEF=''/> minFront='40' maxFront='100' has minFront value greater than maxFront value [/X3D/Scene/ProtoDeclare/ProtoBody/Group/Sound, error]<br>
> <br>
> misfire of Validator, since 40 is not greater than 100. Perhaps alphabetical comparison rather than numerical in stylesheet.<br>
<br>
I suspect you are correct, since checking the existing logic looks OK.<br>
<br>
Now coercing XSLT typing of min/max front/back values to number(@minFront) before comparing...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">ok. I can test again.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Unit testing of TestSchematronDiagnostics.x3d cases all work so we should be OK now, update will deploy sometime.<br>
<br>
> C: PigWorkaround.x3d<br>
> <br>
> <Script USE='ThePig'/> node type must match node type of original <ProtoInstance DEF='ThePig'/> [/X3D/Scene/Transform/Script, error]<br>
> <br>
> Yes, pretty obvious but still accepted by quite a few browsers.<br>
<br>
Well obvious to scrupulous scrutinizing authors maybe but a really mysterious maddening source of error otherwise!<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Actually, in this case it is the source of a workaround, an accidental solution to a problem.</div><div dir="auto"><br></div><div dir="auto">all the best, Andreas</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Glad it worked. 8)<br>
<br>
[...]<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a><br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div></div></div>