<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>I have added oneOf’s to the JSON schema, and will proceed with testing</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Monday, October 22, 2018 12:04 PM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Brutzman, Donald (Don) (CIV)</a><br><b>Subject: </b>Re: [x3d-public] updates to X3D Schema, X3DUOM: refactored names ofenumeration lists</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>I’m taking a rest.  Will look at this when I can, run the JSON schema generator etc.   mostly I’ll be looking for changes in the schema, but I will also look at X3DUOM and the schema generator.  It would be good to have a JSON file and whether it should pass schema validation or not.  If there’.s no changes to any JSON scenegraph documents, perhaps my job is already done?</p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, Oct 22, 2018 at 11:48 AM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:</p></div></div></div><p class=MsoNormal style='margin-left:4.8pt'>Summary: improved support for lists of required/optional enumeration values in X3D Schema, X3DUOM, etc.<br><br>------------------------------------------------------------------------------------<br>1. Background.<br><br>Wikipedia: Enumerated type<br><a href="https://en.wikipedia.org/wiki/Enumerated_type" target="_blank">https://en.wikipedia.org/wiki/Enumerated_type</a><br>"In computer programming, an enumerated type (also called enumeration, enum, or factor in the R programming language, and a categorical variable in statistics) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type."<br><br>A long-standing challenge in X3DJSAIL implementation of X3D Unified Object Model (X3DUOM) has been enumeration lists of string tokens.  Sometimes values are strictly limited, other times they are extensible.  Since the X3D Architecture specification strives for complete clarity whenever defining them, it will be good to handle these as precisely as possible when validating or producing X3D content..<br><br>For an example node, here is the FontStyle specification excerpted:<br>===================================================================<br><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#FontStyle" target="_blank">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#FontStyle</a><br>15.4.1 FontStyle<br><br>FontStyle : X3DFontStyleNode {<br>   MFString []       family      "SERIF"<br>   SFString []       language    ""<br>   MFString []       justify     "BEGIN" ["BEGIN","END","FIRST","MIDDLE",""]<br>   SFString []       style       "PLAIN" ["PLAIN"|"BOLD"|"ITALIC"|"BOLDITALIC"|""]<br>  [...snip...]<br>}<br>===================================================================<br><br>When you read the specification prose, it quickly becomes clear that 'family' and 'language' can be extended by end users to many font families, while 'justify' and 'style' are strictly restricted in what values are allowed.<br><br>This was hard to keep track of in X3DUOM.  It now has been addressed and support has been provided in two ways:<br>a. (v4.0) Refactor renaming of simpleType naming conventions in order to support X3DUOM design patterns:<br>     enumeration Choices (strict sets of string tokens) and<br>     optional Values (allowed, extendable string tokens).<br>b. X3DUOM now includes boolean attribute additionalEnumerationValuesAllowed in all SF/MFString fields that refer to such lists.<br><br>------------------------------------------------------------------------------------<br><br>2. Applied a naming convention.  Primary change was simply regularizing the names of existing xs:simpleType definitions in the X3D XML Schema.  These are primarily internal so they might not be used by anything other than X3DJSAIL and X3DJSONLD.  These lists are not formally defined as such in the X3D Architecture, rather they just reflect the values provided there.<br><br>Source schema and derived X3DUOM:<br><a href="http://www.web3d.org/specifications/x3d-4.0.xsd" target="_blank">http://www.web3d.org/specifications/x3d-4.0.xsd</a><br><a href="http://www.web3d.org/specifications/X3DUnifiedObjectModel-4.0.xml" target="_blank">http://www.web3d.org/specifications/X3DUnifiedObjectModel-4.0.xml</a><br><a href="http://www.web3d.org/specifications/X3DUnifiedObjectModel-4.0.json" target="_blank">http://www.web3d.org/specifications/X3DUnifiedObjectModel-4.0.json</a><br><br>Examples from X3D 4.0 XML Schema documentation:<br>FontStyle        <a href="http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_FontStyle.html" target="_blank">http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_FontStyle.html</a><br>fontFamilyValues <a href="http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_fontFamilyValues.html" target="_blank">http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_fontFamilyValues.html</a><br>justifyChoices   <a href="http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_justifyChoices.html" target="_blank">http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_justifyChoices.html</a><br>fontStyleChoices <a href="http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_fontStyleChoices.html" target="_blank">http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_fontStyleChoices.html</a><br><br>Examples from X3DJSAIL documentation:<br><a href="http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Text/FontStyleObject.html" target="_blank">http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Text/FontStyleObject.html</a><br><a href="http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Text/FontStyleObject.html#field.summary" target="_blank">http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Text/FontStyleObject.html#field.summary</a><br><br>Current X3DJSAIL work includes stricter checking or warnings (as appropriate) when setting/adding/validating new values.  The improved naming conventions and X3DUOM additionalEnumerationValuesAllowed attributes permit such work to progress further.<br><br>------------------------------------------------------------------------------------<br>3. These have only been applied to X3D v4.0 schema/X3DUOM in order to allow inspection and comment.<br><br>TODO will apply to v3.0-v3.3 schemas following review.  This has no direct impact on any existing X3D scene content.<br><br>All feedback welcome.  Have fun with X3D Unified Object Model (X3DUOM)!   8)<br><br>all the best, Don<br>-- <br>Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" target="_blank">http://faculty.nps.edu/brutzman</a><br>_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>