[x3d-public] Code for generating X3D JSON schema, draft06; Internationalizing URIs for V4.0

GPU Group gpugroup at gmail.com
Thu Mar 15 05:44:27 PDT 2018


There are functions that can convert utf8 to utf32, or at least in the
internals of freewrl I found I could convert x3d utf8 SFStrings to UTF32
equivalent,
L.1134   UTF-8 to UTF-32 conversion
https://sourceforge.net/p/freewrl/git/ci/master/tree/freex3d/src/lib/scenegraph/Component_Text.c
for looking up font characters in a font library. I strongly suspect there
are ways to convert the other way. Because of the convertability, I think
web3d specs can comfortably stay with utf8 for their file formats, and
programs that need it in utf16 or 32 for short bursts can convert back and
forth as needed.
-Doug

On Wed, Mar 14, 2018 at 8:54 PM, John Carlson <yottzumm at gmail.com> wrote:

> We are validating URNs, URLs and Relative URLs against URIs and URI
> (relative) References [RFC3986-updates 1738, obsoletes 1808] in X3D 3.3
> JSON Schema (draft06) presently.  Is there an argument for validating
> against IRIs and IRI (relative) References [RFC3987]?  See:
> http://json-schema.org/latest/json-schema-validation.html#
> rfc.section.7.3.5 Note that IETF recently specified “JSON text exchanged
> between systems that are not part of a closed ecosystem MUST be encoded
> using UTF-8”, see: https://tools.ietf.org/html/rfc8259.  What text
> encoding do URIs use?  I’m thinking that IRI references and UTF-16, UTF-32
> and possibly other text encodings might be required in some closed
> ecosystem use cases?  Should we have an internationalized JSON schema?
> What should X3D V4.0 support as far as URIs, URLs, URNs and IRIs in the
> networking component?
>
>
>
> Thanks,
>
>
>
> John
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *John Carlson <yottzumm at gmail.com>
> *Sent: *Wednesday, March 14, 2018 2:26 PM
> *To: *Don Brutzman <brutzman at nps.edu>
> *Cc: *x3d-public at web3d.org
> *Subject: *RE: Code for generating X3D JSON schema, draft06
>
>
>
> Here’s the patch for bringing Roy’s schema up to date with my handcrafted
> draft06 version. Please review for errors.
>
>
>
> John
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *John Carlson <yottzumm at gmail.com>
> *Sent: *Wednesday, March 14, 2018 2:07 PM
> *To: *Don Brutzman <brutzman at nps.edu>
> *Cc: *x3d-public at web3d.org
> *Subject: *RE: Code for generating X3D JSON schema, draft06
>
>
>
> My generated versions and Roy’s handcrafted versions are very different I
> think.   In particular, mine support @USE with oneOf in many more cases. I
> don’t think it would serve a good purpose to compare the two.  But it might
> be useful to compare my draft06 hand crafted version of Roy’s schema with
> his version.  The draft04 version is a couple of patches behind.  Here is
> my handcrafted draft06 version:  https://github.com/
> coderextreme/x3dschema/blob/master/x3d-6.0-JSONSchema.json and here:
> https://github.com/coderextreme/X3DJSONLD/blob/
> master/src/main/schema/x3d-6.0-JSONSchema.json
>
>
>
> My generated schema is the 3.3 version in the same folders, I hope.
> Otherwise, it’s the 5.1 schema (more reliable).   The original generation
> is 5.0, then I jsonlint it to format it and place it in 5.1 and 3.3.   The
> draft04 is the 3.3 backup.
>
>
>
> If you want me to produce a diff of these things, I can, but perhaps
> searching the through the email list (for around October 26th) would
> reveal it.  It may be better for me to produce a diff, but I’ve been a bit
> miffed that I’ve been ignored, so I’m playing Little Johnny Green instead
> of Big John Stout right now 😊😊😊.  I’ll grow up eventually and produce
> the diffs.
>
>
>
> I can recommend the diff available with Cygwin or git bash, or you can
> copy over files and produce diffs with svn diff or git diff.  Or I’m sure
> your IDE should provide a diff tool if you look for it.
>
>
>
> -w with diff ignores whitespace, if that’s an issue with EOLs.
>
>
>
> John
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Don Brutzman <brutzman at nps.edu>
> *Sent: *Wednesday, March 14, 2018 1:44 PM
> *To: *John Carlson <yottzumm at gmail.com>
> *Cc: *x3d-public at web3d.org
> *Subject: *Re: Code for generating X3D JSON schema, draft06
>
>
>
> John, this sounds great.
>
>
>
> Wondering, for your generated JSON schema, can you diff it with our
> version-control JSON Schema by Roy? Looking at a diff (or simply a diff
> excerpt maybe) would help us focus on what changes might be needed.  That
> also might help us diagnose why some of the example test scenes aren't
> validating.
>
>
>
> Note that the current X3D JSON schema we've published is JSON version 04,
> not 06 (i.e. http://json-schema.org/draft-04/schema#)
>
>
>
> Online at
>
>                 http://www.web3d.org/specifications/x3d-3.3-
> JSONSchema.json
>
>
>
>                 http://www.web3d.org/specifications/
> X3dJsonSchemaDocumentation3.3/x3d-3.3-JSONSchema.html
>
>
>
>                 https://sourceforge.net/p/x3d/
> code/HEAD/tree/www.web3d.org/specifications/x3d-3.3-JSONSchema.json
>
>
>
>
>
> On 3/12/2018 11:11 AM, John Carlson wrote:
>
> > Here’s my complete code for generating X3D JSON schema, in accordance
> with draft06.
>
> >
>
> > I do not know if the schema is right or not, but I have checked it
> against x3d resources examples, and have a few questions as to what the
> standard is.  It has different complaints than Roy’s schema in some cases,
> which we need to resolve.
>
> >
>
> > https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/
> etgenerateJSONschema.py
>
> >
>
> > Check the file being generated at the bottom of the source code, and
> paths to the object model etc. before running.
>
> >
>
> > Good luck!
>
> >
>
> > I think this would be fairly easily be made into a stylesheet, if you
> like.
>
> >
>
> > You may check this into the sourceforge repository under some
> development branch, or work off my X3DJSONLD repository.
>
> >
>
> >
>
> > I don’t recall if I sent you this Don, but there are ways with
> Ajv-errors to embed error messages in the schema, which we might use.  I am
> not sure what’s in the standard.
>
> >
>
> > John
>
> >
>
>
>
>
>
> 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 <(831)%20656-2149>
>
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/
> brutzman
>
>
>
>
>
>
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180315/67314d26/attachment.html>


More information about the x3d-public mailing list