[X3D-Ecosystem] PythonSerializer.js broken in X3DJSAIL

Don Brutzman don.brutzman at gmail.com
Thu Jul 17 10:59:21 PDT 2025


John, there is no PythonSerializer.js in X3DJSAIL.

X3DJSAIL offers several ways to create corresponding Python source:

   - command-line invocation -toPython
   - https://www.web3d.org/specifications/java/X3DJSAIL.html#CLASSPATH
   - example invocation in HelloWorldProgram.java:
   -
   https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java

ConfigurationProperties.setXsltEngine(ConfigurationProperties.XSLT_ENGINE_SAXON);
> // default

System.out.println ("Create Python source of model using stylesheet " +
> ConfigurationProperties.STYLESHEET_PYTHON);

savedFileName = thisSceneName + X3D.FILE_EXTENSION_PYTHON;

savedFile = x3dModel.toFilePython(savedFileName);


   - example output
   -
   https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.py

and

   - X3DJSAIL Conversions
   - https://www.web3d.org/specifications/java/X3DJSAIL.html#Conversions


   - X3DJSAIL Utility Methods and Functionality
   - https://www.web3d.org/specifications/java/X3DJSAIL.html#UtilityMethods
   - scroll down to see


   - X3D object methods *.toFilePython(String filename) *and .
   *toStringPython()*
   -
   https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#toFilePython-java.lang.String-
   -
   https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#toStringPython()

These conversions operate by serializing the in-memory Java model to an X3D
file, and then applying a conversion stylesheet.

   - org.web3d.x3d.jsail.ConfigurationProperties.STYLESHEET_PYTHON   =
   "X3dToPython.xslt"
   -
   https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/ConfigurationProperties.html#STYLESHEET_PYTHON

all the best, Don

On Thu, Jul 17, 2025 at 5:21 AM John Carlson via X3D-Ecosystem <
x3d-ecosystem at web3d.org> wrote:

> I tried to resurrect a PythonSerializer for x3d.py.  Alternatives may be a
> GraalPySerializer (programs use X3DJSAIL, or X3DJSAIL itself).  I can use
> X3dToPython.xslt for XML to Python conversions.
>
> John
> --
> X3D-Ecosystem mailing list
> X3D-Ecosystem at web3d.org
> http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250717/61267c08/attachment.html>


More information about the X3D-Ecosystem mailing list