<div dir="ltr">I have xmldiff.js and jsondiff.js in X3DJSONLD.  I don't have pythondiff.js<div><br></div><div>Good luck on roundtripping!</div><div><br></div><div>Thanks a bunch!</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 25, 2020 at 2:48 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for looking into this. I think round-trip tests would mean:<br>
<br>
- run generated python<br>
- use .toXML() on the document, eg. the X3D object.<br>
- regenerate python from the produced XML, with the stylesheet.<br>
- look for errors<br>
- run regenerated python, perhaps do another cycle<br>
<br>
Perhaps as an intermediate step, just validating the generated XML<br>
would suffice to catch a lot of problems.<br>
<br>
-Andreas<br>
<br>
On Sat, Apr 25, 2020 at 12:05 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>
><br>
> [cc: x3d-public with permission]<br>
><br>
> Andreas thank you for another helpful issue report.<br>
><br>
> On 4/23/2020 7:40 PM, Andreas Plesch wrote:<br>
> > Sorry but I keep coming across these (with 0.0.27):<br>
><br>
> No really thanks, my regression testing so far only checks for exceptions, haven't done any round-trip tests which will take some nontrivial work.<br>
><br>
> >>>> import x3d.x3d as x<br>
> > x3d.py package loaded, have fun with X3D Graphics!<br>
> >>>> x.Viewpoint(position=(1,1,1)).toXML()<br>
> > "<Viewpoint position='(1, 1, 1)'/>\n"<br>
> >>>><br>
> ><br>
> > The output should be <Viewpoint position='1, 1, 1'/> .<br>
><br>
> This is common problem/correction for all SFVec3f and similarly all numeric types and most MF types.  Will need to be extra careful (as usual) with SFString and MFString.<br>
><br>
> TODO, hopefully this weekend: will be changing output to match X3D canonical form, <Viewpoint position='1, 1, 1'/><br>
><br>
> Additional error patterns also welcome.  Strict typing of X3D scene graph plus Pythonic strictness plus Quality Assurance (QA) will lead us to a really robust pipeline, suitable even for Big Data information flows.  Java has this rigor already, XML is similarly strong, when JSON Schema is finally standardized/deployed then that alternative dataflow will be ready for "prime time" application chains as well.<br>
><br>
> p.s. motivation: the worst errors are those you don't know about because they fail silently.<br>
><br>
> all the best, Don<br>
> --<br>
> Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">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" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>