[x3d-public] x3d.py SFVec3f toXML keeps parens

John Carlson yottzumm at gmail.com
Sat Apr 25 13:28:09 PDT 2020


I have xmldiff.js and jsondiff.js in X3DJSONLD.  I don't have pythondiff.js

Good luck on roundtripping!

Thanks a bunch!

John

On Sat, Apr 25, 2020 at 2:48 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> Thanks for looking into this. I think round-trip tests would mean:
>
> - run generated python
> - use .toXML() on the document, eg. the X3D object.
> - regenerate python from the produced XML, with the stylesheet.
> - look for errors
> - run regenerated python, perhaps do another cycle
>
> Perhaps as an intermediate step, just validating the generated XML
> would suffice to catch a lot of problems.
>
> -Andreas
>
> On Sat, Apr 25, 2020 at 12:05 PM Don Brutzman <brutzman at nps.edu> wrote:
> >
> > [cc: x3d-public with permission]
> >
> > Andreas thank you for another helpful issue report.
> >
> > On 4/23/2020 7:40 PM, Andreas Plesch wrote:
> > > Sorry but I keep coming across these (with 0.0.27):
> >
> > 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.
> >
> > >>>> import x3d.x3d as x
> > > x3d.py package loaded, have fun with X3D Graphics!
> > >>>> x.Viewpoint(position=(1,1,1)).toXML()
> > > "<Viewpoint position='(1, 1, 1)'/>\n"
> > >>>>
> > >
> > > The output should be <Viewpoint position='1, 1, 1'/> .
> >
> > 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.
> >
> > TODO, hopefully this weekend: will be changing output to match X3D
> canonical form, <Viewpoint position='1, 1, 1'/>
> >
> > 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.
> >
> > p.s. motivation: the worst errors are those you don't know about because
> they fail silently.
> >
> > all the best, Don
> > --
> > Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>  +1.831.656.2149
> > X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> 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/20200425/f6fa9fd4/attachment.html>


More information about the x3d-public mailing list