[x3d-public] Fwd: Modifications to X3D XML Schema to support JSON

John Carlson yottzumm at gmail.com
Sun Nov 15 21:05:51 PST 2015



> Begin forwarded message:
> 
> From: John Carlson <yottzumm at gmail.com>
> Date: November 2, 2015 at 12:26:06 AM CST
> To: Don Brutzman <brutzman at nps.edu>
> Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: Modifications to X3D XML Schema to support JSON
> 
> I discovered this page for setting the number of items in a list and the minimum and maximum length of a list.  I don’t know if it works or is a microsoft only feature.   When I send this through a Jsonix mapping things work, but I haven’t validated the documents agains XSD yet.   Is there a reason why this is not used in X3D XSD?  Does it create a text node or require a text node?   It is highly likely that I will create a custom XSD and check it into my x3djson repository.  I am not proposing this as a modification to the XSD yet.  It requires more research and expertise.  There may be an alternate X3D XSD for working with JSON.  That is all.  Perhaps this has been done?
> 
> 
> https://msdn.microsoft.com/en-us/library/ms256162(v=vs.110).aspx <https://msdn.microsoft.com/en-us/library/ms256162(v=vs.110).aspx>
> 
> Thanks,
> 
> John
>> On Nov 1, 2015, at 11:38 PM, John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>> 
>> What I discovered was if the xs:restriction node was replaced with an xs:list node of the correct type, then arrays would be generated.  You may wish to do this yourself if you are using XML Schema to produce JSON (with JAXB + Jackson or some other method).
>> 
>> Is there some way to express the number of elements in a list?
>> John
>>> On Oct 29, 2015, at 1:08 AM, John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>>> 
>>> It may be as simple as adding an <xs:list … under the MFInt32, MFFloat, MFDouble, MFRotation, MFColor, MFColorRGBA, MFVec2d, MFVec2f, MFVec3d, MFVec3f, MFVec4d, MFVec4f, MFMatrix3f,  MFMatrix3d, MFMatrix4f, and MFMatrix4d simpleTypes. I’m not really sure.  Experts can tell.  This is already done for booleans, strings and time.   I’m not sure what the performance penalty might be, but I think we’d get a speed up in JavaScript.  It’s also time to think about typed arrays and how to smoothly integrate with them.
>>> 
>>> Thanks,
>>> 
>>> John
>>>> On Oct 29, 2015, at 12:40 AM, John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>>>> 
>>>> My JSONIX mapper may be able to convert a string of numbers to an array of numbers in JSON if the right thing is done in X3D XML Schema.  Similar to string, url and justify attributes (which create an array of strings).  I am not familiar with X3D XML Schema.
>>>> 
>>>> John
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151115/2851f59c/attachment-0001.html>


More information about the x3d-public mailing list