[x3d-public] Is https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json valid?
John Carlson
yottzumm at gmail.com
Fri Jun 30 23:41:59 PDT 2023
Alternatively, do the right thing when there's no containerField (default)
specified in MetadataXxx statements in all X3dTo*.xslt. Particularly
X3dToJson.xslt, as I use it quite a lot.
See below.
Thanks!
John
*Table 15.2. containerField Considerations for Metadata Nodes*
CasecontainerFieldParent node
Provide metadata values for parent node containerField="metadata" (default) Any
node except MetadataSet
Provide metadata value nodes in a set containerField="value" MetadataSet
Provide metadata information about parent containerField="metadata"
(default) MetadataSet
On Sat, Jul 1, 2023 at 1:35 AM John Carlson <yottzumm at gmail.com> wrote:
> This appears to be relevant:
>
>
> https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter15-Metadata/Chapter15-MetadataInformation.html#:~:text=Usually%20Metadata%20nodes%20are%20blank,node%20is%20used%20by%20itself
> .
>
> Please emit containerField="metadata" in top level MetadataXzz statements.
>
> Thanks!
>
> John
>
> On Sat, Jul 1, 2023 at 12:28 AM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
>> Hi John. All of the JSON that you find is produced by our X3dToJson.xslt
>> stylesheet, which hopefully meets all patterns we derived and documented at
>>
>>
>>
>> - X3D to JSON Stylesheet Converter
>> - https://www.web3d.org/x3d/stylesheets/X3dToJson.html
>>
>>
>>
>> Well-formed JSON can be checked. All of our online examples have a link
>> to check via JSONLint, though tonight it is saying “unable to connect”
>> (while providing plenty of advertising).
>>
>>
>>
>> - X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 01
>> Technical Overview, Hello World
>> -
>> https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html
>> - upper-right inset box of links: .json
>> <https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json>
>> (check
>> <https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json>
>> )
>> -
>> https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.json
>>
>>
>>
>> If there are mistakes in our X3D .xml -> .json pattern or the conversion
>> stylesheet, they can be fixed.
>>
>>
>>
>> Strict JSON validation isn’t possible until a JSON Schema is approved.
>> If you think that there is a Java-based implementation of the draft JSON
>> Schema that is mature and stable enough to deserve our time, we can try
>> adding that to our various build tools for X3D Example Archives and
>> X3DJSAIL.
>>
>>
>>
>> - http://json-schema.org
>>
>>
>>
>> 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
>> https://faculty.nps.edu/brutzman
>>
>>
>>
>> *From:* John Carlson <yottzumm at gmail.com>
>> *Sent:* Friday, June 30, 2023 8:24 PM
>> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
>> *Cc:* X3D Graphics public mailing list <x3d-public at web3d.org>
>> *Subject:* Is
>> https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json
>> valid?
>>
>>
>>
>> Don, if
>>
>>
>>
>>
>> https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json
>>
>>
>>
>> is supposed to be valid X3D JSON, please inform me. Thanks!
>>
>>
>>
>> To ensure that -value is not a field of Shape in JSON, I have added the
>> following exception in x3djsonld.py.
>>
>>
>>
>>
>>
>> if parent in ("Text", "Shape") and key in ("value"): # don't
>> have value yet, sorry
>>
>> # do value later
>>
>> raise "-value not a supported field of Text or Shape, try
>> -metadata?"
>>
>> continue
>>
>>
>>
>> I can revert the code if necessary. I'm trying to follow the standard as
>> I see it.
>>
>>
>>
>> If -value under Shape is correct, then X3DJSAIL needs to support addValue
>> (as I have it in Java) or setValue. That's my opinion.
>>
>>
>>
>> John
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230701/1d3839d0/attachment.html>
More information about the x3d-public
mailing list