[x3d-public] X3D JSON Javascript schema validators broken on relative URIs. Issues filed.

Don Brutzman brutzman at nps.edu
Tue Feb 2 00:54:20 PST 2016


... continuing on, I looked at the JSON encoding (rather than .x3d) and then found what were likely trying to show me...


"@url":["Dampers.x3d#ScalarDamper","http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.x3d#ScalarDamper\" Dampers.wrl#ScalarDamper \"http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.wrl#ScalarDamper"],

This was caused by an error in the .x3d source, Dampers.wrl#ScalarDamper wasn't quoted.

Correction attached.  Does that match your understanding on this scene?


On 2/2/2016 12:38 AM, Don Brutzman wrote:
> cc: list
>
> Please explain John, am not seeing what you would consider bad in the following URL list.  URNs perhaps?
>
> The backslashes were produced during your cut & paste, and are not in the scene source.
>
> The relative URLs are OK.  We picked the # syntax for prototype names since it matched the HTML bookmark scheme, thus a well-supported syntax.
>
> On 1/28/2016 10:01 AM, John Carlson wrote:
>> I was able to replace the URI format with the same one from the Ajv code and the validator now works.  ???  However, it found what I view as a bad URI:
>
> <ExternProtoDeclare name='ScalarDamper' url='"Dampers.x3d#ScalarDamper"
>
>> "http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.x3d#ScalarDamper\" Dampers.wrl#ScalarDamper \"http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.wrl#ScalarDamper”
>>
>>
>> in
>>
>> examples//Basic/Followers/FollowerExternalPrototypeDeclarations.json
>
> Also
> <ExternProtoDeclare name='PositionDamper' url='"urn:inet:hersto.net:node:PositionDamper" "Dampers.wrl#PositionDamper" "http://www.hersto.net/Followers/Dampers.wrl#PositionDamper"'>
>
>
> The URNs are questionable but they are defined by IETF and endorsed by W3C and included in VRML/X3D specifications.  Not sure if anyone uses them anymore.
>
> RFC 2141: URN Syntax
> https://www.ietf.org/rfc/rfc2141.txt
>
> URIs, URLs, and URNs: Clarifications and Recommendations 1.0
> Report from the joint W3C/IETF URI Planning Interest Group
> W3C Note 21 September 2001
> https://www.w3.org/TR/uri-clarification/
>
> Roy and I got started on an X3D Regexes page.  We will return to that when other X3D Schema work in progress is complete.  Skeleton at
> http://www.web3d.org/specifications/X3dRegularExpressions.html
>
> If you look inside the X3D Schema, you will find a number of regexes for X3D datatypes in there already.  XML Schema does let you define a regex to validate special types, so this is a worthwhile future task.
>
> all the best, Don


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 http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FollowerExternalPrototypeDeclarations.x3d
Type: model/x3d+xml
Size: 10914 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160202/2893c39e/attachment-0001.x3d>
-------------- next part --------------
{ "X3D": {
    "@profile":"Immersive",
    "@version":3.2,
    "@xsd:noNamespaceSchemaLocation":"http://www.web3d.org/specifications/x3d-3.2.xsd",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"FollowerExternalPrototypeDeclarations.x3d"
          },
          {
            "@name":"description",
            "@content":"X3D Follower example"
          },
          {
            "@name":"creator",
            "@content":"Herbert Stocker"
          },
          {
            "@name":"translator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"18 April 2006"
          },
          {
            "@name":"translated",
            "@content":"10 April 2012"
          },
          {
            "@name":"modified",
            "@content":"2 February 2016"
          },
          {
            "@name":"reference",
            "@content":"FollowerPrototypeDeclarations.x3d"
          },
          {
            "@name":"reference",
            "@content":"originals/Chasers.wrl"
          },
          {
            "@name":"reference",
            "@content":"originals/Dampers.wrl"
          },
          {
            "@name":"reference",
            "@content":"Stocker_06_Followers.pdf"
          },
          {
            "@name":"reference",
            "@content":"http://www.hersto.com/Publications/Followers"
          },
          {
            "@name":"requires",
            "@content":"X3D version 3.2 or greater"
          },
          {
            "@name":"subject",
            "@content":"X3D Follower Chaser Damper"
          },
          {
            "@name":"warning",
            "@content":"under development"
          },
          {
            "@name":"TODO",
            "@content":"Rename and test these prototypes to match final names in X3D Specification Followers Component"
          },
          {
            "@name":"TODO",
            "@content":"Ensure full coverage of follower nodes in order to provide backwards compatibility with X3D v3.0 and v3.1."
          },
          {
            "@name":"reference",
            "@content":"http://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html"
          },
          {
            "@name":"reference",
            "@content":"http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html"
          },
          {
            "@name":"identifier",
            "@content":"http://www.web3d.org/x3d/content/examples/Basic/Followers/FollowerExternalPrototypeDeclarations.x3d"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@info":["The ExternProto nodes found in this file implement principles described in the paper","Linear Filters - Animating Objects in a Flexible and Pleasing Way","They have been proposed and added to the X3D standard in 2006.","Webpage: http://www.hersto.net/Followers","","Please use the code in this file in any content or application you like","or modify it in any way.","","The code here works, however things like detecting when a transition has ended","and when the node can stop calculating and updating the output or secondary fields","like set_value or initial_destination are not yet implemented.","Nevertheless,,set_destination,and,value_changed,do,work."],
              "@title":"Follower (Chaser and Damper) nodes"
            }
          },
          { "#comment":"================================================"
          },
          { "#comment":"Do not use these! The following ExternProtoDeclares were produced when converting the original examples, and are included for completeness only."
          },
          { "ExternProtoDeclare":
            {
              "@name":"OrientationChaser",
              "@url":["urn:inet:hersto.net:node:OrientationChaser","Chasers.x3d#OrientationChaser","http://www.web3d.org/x3d/content/examples/Basic/Followers/Chasers.x3d#OrientationChaser","Chasers.wrl#OrientationChaser","http://www.web3d.org/x3d/content/examples/Basic/Followers/Chasers.wrl#OrientationChaser","http://www.hersto.net/Followers/Chasers.wrl#OrientationChaser"],
              "field": [
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"duration",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"OrientationDamper",
              "@url":["urn:inet:hersto.net:node:OrientationDamper","Dampers.wrl#OrientationDamper","http://www.hersto.net/Followers/Dampers.wrl#OrientationDamper"],
              "field": [
                {
                  "@name":"isLoaded",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"order",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"tau",
                  "@accessType":"inputOutput",
                  "@type":"SFFloat"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"eps",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"PlacementChaser",
              "@url":["Chasers.x3d#PlacementChaser","http://www.web3d.org/x3d/content/examples/Basic/Followers/Chasers.x3d#PlacementChaser","Chasers.wrl#PlacementChaser","http://www.web3d.org/x3d/content/examples/Basic/Followers/Chasers.wrl#PlacementChaser"],
              "field": [
                {
                  "@name":"isLoaded",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"set_valuePos",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"set_valueOri",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"set_destinationPos",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"duration",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"set_destinationOri",
                  "@accessType":"inputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"initial_valuePos",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"initial_destinationPos",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"valuePos_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"initial_valueOri",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"initial_destinationOri",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"valueOri_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"Position2fDamper",
              "@url":["urn:inet:hersto.net:node:Position2fDamper","Dampers.wrl#Position2fDamper","http://www.hersto.net/Followers/Dampers.wrl#Position2fDamper"],
              "field": [
                {
                  "@name":"isLoaded",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"order",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"tau",
                  "@accessType":"inputOutput",
                  "@type":"SFFloat"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"eps",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"Position2fChaser",
              "@url":["urn:inet:hersto.net:node:Position2fChaser","Chasers.wrl#Position2fChaser","http://www.hersto.net/Followers/Chasers.wrl#Position2fChaser"],
              "field": [
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"duration",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec2f"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec2f"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"PositionChaser",
              "@url":["urn:inet:hersto.net:node:PositionChaser","Chasers.wrl#PositionChaser","http://www.hersto.net/Followers/Chasers.wrl#PositionChaser"],
              "field": [
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"duration",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"PositionDamper",
              "@url":["urn:inet:hersto.net:node:PositionDamper","Dampers.wrl#PositionDamper","http://www.hersto.net/Followers/Dampers.wrl#PositionDamper"],
              "field": [
                {
                  "@name":"isLoaded",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"order",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"tau",
                  "@accessType":"inputOutput",
                  "@type":"SFFloat"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"eps",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ScalarDamper",
              "@url":["Dampers.x3d#ScalarDamper","http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.x3d#ScalarDamper","Dampers.wrl#ScalarDamper","http://www.web3d.org/x3d/content/examples/Basic/Followers/Dampers.wrl#ScalarDamper"],
              "field": [
                {
                  "@name":"isLoaded",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"set_destination",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"initial_destination",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"order",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"tau",
                  "@accessType":"inputOutput",
                  "@type":"SFFloat"
                },
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"transparency_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"initial_value",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"isActive",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"eps",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                }
              ]
            }
          }
        ]
    }
  }
}


More information about the x3d-public mailing list