[x3d-public] Wish list for X3DJSAIL

John Carlson yottzumm at gmail.com
Wed Mar 20 16:02:15 PDT 2024


Okay, I am seeing that the stylesheet to use is configurable in the
X3DJSAIL.properties file.  Great.  That applies to output.

Can I have an X3DJSAIL property for overriding the HAnimHumanoid class?
Suggestions?  Or just override one output method through dependency
injection?  Can I do dependency injection from the command line?

I'm guessing alternate stylesheets is the correct approach, but it may not
affect XML output?  comments?  Is there a way to set the stylesheets in
CommandLine.java command line options?  If I can do that, then I can get
rid of my RunSaxon.java  Except RunSaxon.java handles batch requests.
Another thing to do would be to send translated file names to standard
output, which I can then process successful conversions through a
json2all.js script.

Should I donate RunSaxon.java to the cause?

Here it is:

X3DJSONLD/src/main/java/net/coderextreme/RunSaxon.java at master ·
coderextreme/X3DJSONLD (github.com)
<https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/java/net/coderextreme/RunSaxon.java>

Probably some modifications would be required to pair input with output.  I
compute stuff like file names automatically.

What I'm concerned most about is maintaining both a scene graph and a
String in memory as the Strings can get quite large (8GB).  It looks like
there may already be streaming input, so the question might be, how is
streaming to/from standard input/standard output from a scene graph
accomplished?  Similar to tovrml.exe.  Say I want to put CommandLine in a
shell or Bun JavaScript pipeline?

I'll read the X3DJSAIL wish list in a bit.

Thanks!

John

On Wed, Mar 20, 2024 at 4:53 PM John Carlson <yottzumm at gmail.com> wrote:

> Support:
>
> toWriterXML(Writer w)
> toOutputStreamXML(OutputStream os)
> fromReaderXML(Reader r)
> fromInputStreamXML(InputStream is)
>
> methods in I/O classes or buffering/channel classes (java.nio).  I’ve not
> used java.nio much.    One can also consider Jackson XML.
>
> Or otherwise support XML Source and Result interfaces, namely:
>
> javax.xml.transform.Source
> javax.xml.transform.Result
>
> and implementers (preferred over above, I think), Sources can return a
> Node.
>
> I may do this myself.  Let me know if this is already done.
>
> Comments?
>
> It would be good to do this for Classic VRML and VRML97 as well.
>
> The benefit is that the developer can bring any I/O object classes and any
> XML i/o they want.  I believe that this can provide for formatting/pretty
> printing as well, and the user should be able to specify what pretty
> printing they want, so indenting is not necessary, or can be customized.
>
> What I’m ultimately aiming for is flexibility in field output ordering.
> I realize this may not do it, can I bring my own stylesheets to X3DJSAIL?
> Suggestions on how to override current methods recommended?  I just want to
> override the HAnimHumanoid class.  I don’t want to touch X3DJSAIL if I can
> help it.
>
> Another advantage might be that one doesn’t have to hold the whole
> document in a String on output.
>
> Breathe Java!
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240320/ba5496e5/attachment.html>


More information about the x3d-public mailing list