[x3d-public] can SFString contain newline, carriage return?

John Carlson yottzumm at gmail.com
Mon May 4 22:36:24 PDT 2020


So it seems like DOM2JSONSerializer.js is the most critical code to fix,
since RunSaxon.java is being deprecated in much of my code (and thus Don's
stylesheets, especially X3dToJson.xslt).

On Tue, May 5, 2020 at 12:23 AM John Carlson <yottzumm at gmail.com> wrote:

> So I tried a less cumbersome task.  Just comparing the HAnim hands and
> feet examples:
>
> Don's version of JSON is on right, my version of JSON is on left.
>
> $ node jsondiff.js ../data/HAnimModelsHandsFeet.json
> ~/x3dvalidate/HAnimModelsHandsFeet.json
>
> ================================================================================
> C:\Users\coderextreme\X3DJSONLD\src\main\node\jsondiff.js
> ../data/HAnimModelsHan
> dsFeet.json C:/Users/coderextreme/x3dvalidate/HAnimModelsHandsFeet.json
> @2 /X3D/head/meta/17/@content/0/0 /X3D/head/meta/17/@content/0/0
> < "5"
> > "04"
> @2 /X3D/head/meta/18/@content/0/0 /X3D/head/meta/18/@content/0/0
> < "DOM2JSONSerializer.js,"
> > "X3dToJson.xslt,"
> @2 /X3D/head/meta/18/@content/1/0 /X3D/head/meta/18/@content/1/0
> < "
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONS
> erializer.js"
> > "https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
> @2 /X3D/head/meta/19/@content/3/0 /X3D/head/meta/19/@content/3/0
> < "http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
> > "https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
> @7 /X3D/Scene/-children/3/Transform/-children/0/Inline/@displayBBox
> > false
> @7
> /X3D/Scene/-children/3/Transform/-children/2/Transform/-children/0/Inline/@di
> splayBBox
> > false
> @7 /X3D/Scene/-children/3/Transform/-children/2/Transform/@displayBBox
> > false
> @7 /X3D/Scene/-children/3/Transform/@displayBBox
> > false
> @7 /X3D/Scene/-children/4/Transform/-children/0/Inline/@displayBBox
> > false
> @7 /X3D/Scene/-children/4/Transform/@displayBBox
> > false
> @7 /X3D/Scene/-children/5/Transform/-children/1/Inline/@displayBBox
> > false
> @7 /X3D/Scene/-children/5/Transform/@displayBBox
> > false
> @7 /X3D/Scene/-children/6/Transform/-children/1/Inline/@displayBBox
> > false
> @7 /X3D/Scene/-children/6/Transform/@displayBBox
> > false
> @2 /X3D/JSON schema /X3D/JSON schema
> < "http://www.web3d.org/specifications/x3d-4.0-JSONSchema.json"
> > "http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json"
>
> Different!
>
> However, the other ones are not so easy to compare.  Can someone suggest
> good json diff tool? python's jsondiff tool is not good enough.
>
> This one looks good!  http://www.jsondiff.com/  A bit cumbersome perhaps!
>
> Thanks,
>
> John
>
> On Mon, May 4, 2020 at 11:11 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> It would be very cool if I could launch a validator on a file from the
>> command-line.  I will look into it for JSON.
>>
>> On Mon, May 4, 2020 at 11:08 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> I guess we're starting with the HAnim standard, and following it with
>>> tools.  That is, the spec examples are for human consumption, not machine
>>> consumption.
>>>
>>> Or..., should I look into extending the validator?
>>>
>>> On Mon, May 4, 2020 at 10:59 PM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> I see 145 occurences leading line break after the leading " in an
>>>> attribute in the standards examples under
>>>> HumanoidAnimation/HAnimSpecificationsV2
>>>>
>>>> $ grep '="$' KoreanCharacterAnnex* |wc
>>>>     145     398   13514
>>>>
>>>> Hands and Feet in CharactersV2, 👍👍
>>>>
>>>> Can the spec examples be put through a validator?  Maybe I'll do that!
>>>>
>>>> John
>>>>
>>>>
>>>>
>>>> On Mon, May 4, 2020 at 9:58 PM John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>>> For example, in values= and point= attributes in:
>>>>>
>>>>>
>>>>> www.web3d.org/x3d/content/examples/HumanoidAnimation/HAnimSpecificationV2/KoreanCharacterAnnexD01Jin.x3d
>>>>>
>>>>> (from the standard),
>>>>>
>>>>> I see a leading line break after the leading " in the .x3d file.  I
>>>>> will basically have to change ALL my code to expect this. This is NOT
>>>>> funny, and will require me to redo ALL my testing.
>>>>>
>>>>> Giggle!
>>>>>
>>>>> John
>>>>>
>>>>> On Mon, May 4, 2020 at 9:42 PM John Carlson <yottzumm at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Would this ultimately, apply to ALL XML attributes?  Need some help
>>>>>> here!
>>>>>>
>>>>>> On Sun, May 3, 2020 at 1:06 PM John Carlson <yottzumm at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I found some suggestions in the standards that one use &#xA; and
>>>>>>> &#xD;, but no requirement???
>>>>>>>
>>>>>>> The reason I mention this is because in the HAnim motion standard,
>>>>>>> there's examples that certainly look like a SFStrings that cover more than
>>>>>>> one line, without newline and carriage return encoding, as above.  Plus the
>>>>>>> Motion interface has joints and channels as "string"s, not
>>>>>>> "sequence<string>"
>>>>>>>
>>>>>>> I think the standard is correct, we just need to modify our schemas
>>>>>>> and X3DUOM to change MFString to SFString for joints and channels, if not
>>>>>>> already done.
>>>>>>>
>>>>>>> I think I have heard from at least a couple of people that the
>>>>>>> standard is correct, but from one person, a negative.
>>>>>>>
>>>>>>> I am not sure if this is a difference between HTML and XML?
>>>>>>>
>>>>>>> This is timely, because people are implementing the new HAnim motion
>>>>>>> standard.
>>>>>>>
>>>>>>> Comments?   Corrections?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> John
>>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200505/1e4f492c/attachment-0001.html>


More information about the x3d-public mailing list