<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Here I am to discuss comment handling in the X3dToJson.xslt stylesheet.  Some may not care, but it affects the x3d JSON schema, and where people can place comments in the JSON (which the schema checks), and how tools that post process the converted JSON can rearrange the JSON file (specifically the prototype expander), and roundtripping.<div class=""><br class=""></div><div class="">Note that you can’t currently put a JSON comment inside a -geometry or -material node from the stylesheet or in the schema or in the JSON even, the stylesheet moves it out of those nodes, reordering the nodes, making roundtrip impossible back to XML.  If we maintain that the functionality is still there, that’s fine, it’s just that the comment nodes will be reordered with respect to the other nodes, and I haven’t figured out yet how to add a comment to a -geometry node that’s coming from an SFNode which is really an MFNode because it has a comment the ProtoInstance fieldValue, which seems like they want a comment in each geometry field that the fieldValue replaces.</div><div class=""><br class=""></div><div class="">I include an XML and JSON result from the stylesheet for your perusal.  Specifically, I am pushing for all object container nodes to be arrays (or optionally arrays) so they can handle comments, like -geometry and -material container nodes.  This will affect downstream artifacts and is a major change.</div><div class=""><br class=""></div><div class="">One thing I can do is look at the type of the field in the ProtoInterface, see that it’s SFNode, and throw out all comments from the fieldValue in my ProtoExpander, and make the fieldValue an object instead of an array.  However, I am still concerned about reordering of comments, and if we solve the comment problem, we may solve my problem as well :).</div><div class=""><br class=""></div><div class="">John</div></body></html>