<div dir="auto">Okay, I ran into a fundamental problem where I had a conflict with putting X3DStatements into places where X3DNode goes, so I just added functions in X3DNode into X3DStatement. It wouldn’t validate with libxml2, but at least I got output.</div><div dir="auto"><br></div><div dir="auto">I hope this is kosher, I couldn’t find another way yet.</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Sep 2, 2025 at 8:42 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Stylesheet hounds may want to: Go SAIL!<div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/lib/stylesheets/CreateX3DGSAIL.xslt" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/lib/stylesheets/CreateX3DGSAIL.xslt</a></div><div><br></div><div>Well, I've generated one XML scene using GoLang.</div><div><br></div><div>Thanks to Don Brutzman and Loren Peitso for their efforts on X3DPSAIL, a direct ancestor of this project.</div><div><br></div><div>No, it doesn't do containerField. Urgh! Do not add containerField to this project! ;) Sure, be my guest!</div><div><br></div><div>Issues can go to this project, but I've had one night of Go programming, so don't expect fixes soon. <a href="https://github.com/coderextreme/gox3d" target="_blank">coderextreme/gox3d: Go X3D API</a> Sample main.go program included.</div><div><br></div><div>The JSON Schema API generator ended up being a red herring. I'm not sure where this project will end up.</div><div><br></div><div>I'm guessing I can put together a GoSerializer.js without too much issue. Contributed X3dToGo.xslt welcome!</div><div><br></div><div>I don't really plan to export anything other than XML, but you can sure can request others!</div></div><div dir="ltr"><div><br></div><div>John Carlson</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 2, 2025 at 3:13 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@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"><div dir="ltr"><div dir="ltr">Got enough to get a simple valid JSON scene validated with npx x3dvalidate:<div><br></div><div>package main<br><br>import (<br> "fmt"<br> "encoding/json"<br> "gox3d/x3d"<br>)<br><br>func main() {<br> root := &x3d.Root{<br> X3D: x3d.X3D{<br> Profile: "Full",<br> Version: "4.0",<br> Encoding: "UTF-8",<br> Head: &x3d.Head{<br> Meta: x3d.Meta{<br> {Name: "title", Content: "Initial.go"},<br> {Name: "creator", Content: "John Carlson"},<br> {Name: "description", Content: "Second Go scene"},<br> },<br> },<br> Scene: x3d.Scene{},<br> },<br> }<br> jsonData, err := json.Marshal(root)<br> if err != nil {<br> fmt.Printf("Error marshaling to JSON: %v\n", err)<br> return<br> }<br><br> fmt.Println(string(jsonData))<br>}</div><div><br></div><div>Result (validated, but incorrect due to Scene before head):</div><div><br></div><div>{"X3D":{"@profile":"Full","@version":"4.0","Scene":{},"encoding":"UTF-8","head":{"meta":[{"@content":"Initial.go","@name":"title"},{"@content":"John Carlson","@name":"creator"},{"@content":"Second Go scene","@name":"description"}]}}}</div><div><br></div><div>Time for a GoSerializer.js yet? Maybe I will be able to produce JSON myself!</div><div><br></div><div>Hmm!</div></div></div>
</blockquote></div>
</blockquote></div></div>