[x3d-public] Well, @rotation errors (normalization) all originals; pajekOriginals; getting serious about X3D JSON Schema in draft-07

John Carlson yottzumm at gmail.com
Sun Apr 4 20:29:44 PDT 2021


I guess my idea at this point would be to download Everit jar from 
github releases, and try to apply it to the X3D JSON schema and a few 
example files in a build.xml

We need to be aware in this case, which other jars need to be 
downloaded, perhaps.  I can provide a list that got me going:

/home/${USER}/.m2/repository/com/google/re2j/re2j/1.1/re2j-1.1.jar

/home/${USER}/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar

/home/${USER}/.m2/repository/org/json/json/20190722/json-20190722.jar

/home/${USER}/.m2/repository/com/damnhandy/handy-uri-templates/2.1.8/handy-uri-templates-2.1.8.jar

These would need to be downloaded from secure, reliable source, if not 
found in the everit release.

Note that this list is the one I use.  There are more up-to-date jars, 
as listed in:

json-schema/core/pom.xml

Likely, it would be wise to upgrade the classpath:


         <dependency>
             <groupId>com.google.re2j</groupId>
             <artifactId>re2j</artifactId>
             <version>1.3</version>
         </dependency>
         <dependency>
             <groupId>org.json</groupId>
             <artifactId>json</artifactId>
             <version>20201115</version>
         </dependency>

John

On 4/3/21 8:23 PM, Don Brutzman wrote:
> Hmmm. Several twists and turns here.
>
> 1. We already have a HelloWorld.json (of course) and it looks like 
> yours strips out a bunch of stuff an inserts a Transform
>
>   "@rotation":[2,1,0,3]
>
> There is a Special Place in Hell where everything has the same name.  
> Let's not go there, please...
>
> All of our original models have .x3d in version control, with other 
> file encodings and language bindings autogenerated.
>
> If you want to create a TestRotationsNormalization.x3d scene, then a 
> good place for that to be maintained will be with the 15 other test 
> scenes in
>
> * https://www.web3d.org/x3d/content/examples/Basic/development/
>
> Suggest you will want both an SFRotation (such as the Transform 
> @rotation above) and an MFRotation, perhaps most familiar node might 
> be an OrientationInterpolator.
>
> Please craft a TestRotationsNormalization.x3d scene and we can add it 
> to the examples archive.
>
> ---
>
> 2.  Glad that you are handling pajekOriginals by postprocessing. Since 
> these are "original" models created by a tool, we wont' be changing them.
>
> * Pajek Analysis and visualization of very large networks
>   http://mrvar.fdv.uni-lj.si/pajek
>
> * Pajek manual, p. 80, chapter 5 Exports to EPS/SVG/X3D/VRML
> https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.726.5730&rep=rep1&type=pdf
>
> Perhaps we should come up with a metadata scheme to indicate when a 
> model has known errors so that automatic corrections are disable and 
> diagnostics are silenced.
>
> ---
>
> 3. Primary task remains.
>
> What I have been referring to with HelloWorld was confirming that JSON 
> Schema and JSON X3D model are truly validating, and the patterns to 
> accomplish that.  Silent (non-reporting) command-line invocations 
> aren't strong evidence and don't add much insight.
>
> As ever, the JSON Schema patterns are what we want to focus on using 
> JSON Schema Draft 7.  We should update our X3D JSON pages to match.
>
> * https://json-schema.org
>
> These people remain a curious bunch.  While draft-07 now appears well 
> supported, they are up to releasing draft 20.
>
> The following is their latest documentation, written for draft-07 but 
> updated in 2021.
>
> * https://json-schema.org/understanding-json-schema/
>
> Once patterns are confirmed we can look at X3D JSON Schema 
> autogeneration from X3DUOM.
>
> Based on your emails one might deduce that you may have such a thing, 
> but it has not been reviewed and not been integrated. Please let's 
> backtrack and get on firm footing.
>
> If you do have a single best-effort X3D JSON schema, please provide a 
> stable url so that we can study it.
>
> ---
>
> 4. Everit
>
> Are you still getting this from the following site?
>
> * https://github.com/everit-org/json-schema
>
> * https://github.com/everit-org/json-schema/releases
>
> ---
>
> 5. Next
>
> This week I cannot meet Monday but have sent you an update to meet on 
> Web3D line Tuesday 14-1500 pacific, hope that can work for you.
>
> Thanks for continued pounding on the problem.  Let's hammer this into 
> a repeatable understandable result, rather than scattered pieces.
>
> On 4/2/2021 10:50 PM, John Carlson wrote:
>>
>> Here's a small test (attached.).
>>
>> John
>>
>> On 4/3/21 12:44 AM, John Carlson wrote:
>>> Likely we need a very small test case. I will work on one.
>>>
>>> John
>>>
>>> On 4/3/21 12:42 AM, John Carlson wrote:
>>>> No worries about lax or non-lax validation.  The only cases (1800)
>>>> showing validation errors with @rotation are pajekOriginals.  This is
>>>> easily handled in a post process filter. Sorry for not filtering them
>>>> earlier. Everit results next (Ajv doesn't show up, likely because
>>>> both schemas fail).
>>>>
>
>
>>
>>
>> The strange thing is, the autogenerated code did not throw any errors 
>> with Everit for rotation.
>>
>> On 4/2/21 11:07 PM, John Carlson wrote:
>>> It appears that all the rotation errors were in originals:
>>>
>>> https://coderextreme.net/rot.txt
>>>
>>> So I could go either way with the auto-generated X3D JSON schema, 
>>> pasting fixed text or generating less restrictive code.
>>>
>>>
>>> John
>>>
>
>
>>>> "@rotation":[2,1,0,3],
>>>>
>>>> I made this change to show the errors.  I do not know why the hand
>>>> generated schema errors do not show up.  That seems to be an issue.
>>>> Thanks for the backwards step Don.
>>>>
>>>> So strict validation is still in place, as 2 > 1.
>>>>
>>>> So the current issue seems to be the hand generated schema. The
>>>> definitions are in different order.   Changing order doesn't fix 
>>>> things.
>
> We need to get on the "same sheet of music" with the same best-case 
> schema.
>
>>>> I guess i would propose to file an issue with Everit about the two
>>>> schemas and the HelloWorld.json
>>>>
>>>> Good catch!
>>>>
>>>> John
>
> If we can apply Everit in the Ant build.xml then we can repeat the 
> error.  At that point any problem report becomes measurably fix-able.
>
>>>> On 4/2/21 11:22 PM, Don Brutzman wrote:
>>>>> Please backtrack.  Not clear you heard what we said this morning or
>>>>> posted.
>>>>>
>>>>> Don't worry about rotation normalization now please.  Lax validation
>>>>> is good, normalize() routines in our libraries can help.
>>>>>
>>>>> You are showing results from gigantic visualization files done by a
>>>>> grad student with the pajek tool eleven years ago.
>>>>>
>>>>> Sorry but can't keep up if we can't do Hello World.
>>>>>
>>>>> Thanks John.
>
> all the best, Don



More information about the x3d-public mailing list