<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I saw a couple of typos:<br>
    </p>
    <div class="moz-cite-prefix">On 10/14/21 1:29 AM, John Carlson
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:0583a24a-2b7a-48b5-b793-c62aef97c3c6@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>There's also a good opportunity to add patterns to my generated
        schema, as well as reduce bloat:</p>
      <p>~/X3DJSONLD/src/main/schema$ grep pattern
        x3d-4.0-JSONSchema.json |wc<br>
           3108    6216  239229<br>
        ~/X3DJSONLD/src/main/schema$ grep pattern
        x3d-4.0-JSONSchema.json |sort -u|wc<br>
             27      54    3529</p>
      <p>X3DUOM may point the way:</p>
      <p>X3DJSONLD/src/specifications$ grep regex
        X3dUnifiedObjectModel-4.0.xml |wc<br>
             41      41    5874</p>
      <p>X3DJSONLD/src/specifications$ grep regex
        X3dUnifiedObjectModel-4.0.xml |sort -u|wc<br>
             24      24    3401</p>
      <p>Can we reduce the number of regex's in X3DUOM,
        X3dXml4.0SchemaConvertedToJson2020-12Schema.json and
        x3d-4.0-JSONSchema.json? Do we want to? Should we add xs: to X3D
        JSON schema?</p>
      <p>Normally my X3D JSON schema does not have patterns, I just
        added them temporarily to get a feel for it.</p>
      <p>My first suggestion is to get patterns working with
        x3d-4.0-JSONSchema.json and
        X3dXml4.0SchemaConvertedToJson2020-12Schema.json in at least one
        programming language.</p>
      <p>This program may help as it deals with both schemas in python:</p>
      <p>from jsonschema import validate<br>
        import json<br>
        import sys<br>
      </p>
      <p><br>
        # validate stdin against the X3D4 JSON schemas<br>
        <br>
        try:<br>
            instance = json.loads(sys.stdin.read())<br>
            sys.stdout.write("jsonValid ")<br>
        except:<br>
            sys.stdout.write("jsonInvalid ")<br>
        <br>
        try:<br>
            with open('../schema/x3d-4.0-JSONSchema.json', 'r') as
        schemafile:<br>
                schema = json.load(schemafile)<br>
                validate(instance=instance, schema=schema)<br>
                sys.stdout.write("jwcValid ")<br>
        except:<br>
                sys.stdout.write("jwcInvalid ")<br>
        sys.stdout.flush()<br>
        <br>
        try:<br>
            with
        open('../schema/X3dXml4.0SchemaConvertedToJson2020-12Schema.json',
        'r') as schemafile:<br>
                schema = json.load(schemafile)<br>
                validate(instance=instance, schema=schema)<br>
                sys.stdout.write("dbValid ")<br>
        except:<br>
                sys.stdout.write("dbInvalid ")<br>
        sys.stdout.flush()<br>
      </p>
      <p>Thanks,</p>
      <p>John<br>
      </p>
      <div class="moz-cite-prefix">On 10/14/21 1:06 AM, John Carlson
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:c59c1c7d-04cd-a6fc-3807-8382aaa031cd@gmail.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <p>X3dXml4.0SchemaConvertedToJson2020-12Schema.json has many
          XML'isms:<br>
        </p>
        <p><br>
        </p>
        <p>X3DJSONLD/src/main/schema$ grep xs:
          X3dXml4.0SchemaConvertedToJson2020-12Schema.json |sort -u<br>
                                                  "$ref":
          "#/$defs/xs:ID"<br>
                                                  "$ref":
          "#/$defs/xs:IDREF"<br>
                                                  "$ref":
          "#/$defs/xs:NMTOKEN"<br>
                                                  "$ref":
          "#/$defs/xs:NMTOKENS"<br>
                          "xs:ID": {<br>
                          "xs:IDREF": {<br>
                          "xs:NMTOKEN": {<br>
                          "xs:NMTOKENS": {</p>
        <p><br>
        </p>
        <p>What should I do?<br>
        </p>
        <p>My schema does not contain any xs: tags.</p>
        <p>Here are how these types are defined in
          X3dXml4.0SchemaConvertedToJson2020-12Schema.json</p>
        <p>                "xs:ID": {^M<br>
                                  "pattern":
"^([A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿<200c>-<200d>⁰-↏Ⰰ-⿯、-퟿>豈-﷏ﷰ-�𐀀-󯿿][\\d\\--\\.A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-޿ߊ-॥॰-৥ৰ-੥ੰ-૥૰-୥୰-௥௰-౥౰-೥೰-൥൰-෥෰-๏๚-໏໚-༟༪-ဿ၊-ႏႚ-៟៪-᠏᠚-᥅ᥐ-᧏᧚-᩿᪊-᪏᪚-᭏᭚-ᮯᮺ-᰿᱊-ᱏᱚ-῿<200c>-<200d>‿-⁀⁰-↏Ⰰ-⿯、-ꘟꘪ-꣏꣚-ꤊ-ꧏ꧚-ꧯꧺ-꩏꩚-꯯꯺-퟿﷏ﷰ-/:-�𐀀-𐒟𐒪-𑁥𑁰-𑃯𑃺-𑄵𑅀-𑇏𑇚-𑋯𑋺-𑑏𑑚-𑓏𑓚-𑙏𑙚-𑚿𑛊-𑜯𑜺-𑣟𑣪-𑱏𑱚-𖩟𖩪-𖭏𖭚-𝟍𝠀-𞥏𞥚-󯿿]*)$",^M<br>
                                  "type": "string"^M<br>
                          },^M<br>
                          "xs:IDREF": {^M<br>
                                  "pattern":
"^([A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿<200c>-<200d>⁰-↏Ⰰ-⿯、-퟿>豈-﷏ﷰ-�𐀀-󯿿][\\d\\--\\.A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-޿ߊ-॥॰-৥ৰ-੥ੰ-૥૰-୥୰-௥௰-౥౰-೥೰-൥൰-෥෰-๏๚-໏໚-༟༪-ဿ၊-ႏႚ-៟៪-᠏᠚-᥅ᥐ-᧏᧚-᩿᪊-᪏᪚-᭏᭚-ᮯᮺ-᰿᱊-ᱏᱚ-῿<200c>-<200d>‿-⁀⁰-↏Ⰰ-⿯、-ꘟꘪ-꣏꣚-ꤊ-ꧏ꧚-ꧯꧺ-꩏꩚-꯯꯺-퟿﷏ﷰ-/:-�𐀀-𐒟𐒪-𑁥𑁰-𑃯𑃺-𑄵𑅀-𑇏𑇚-𑋯𑋺-𑑏𑑚-𑓏𑓚-𑙏𑙚-𑚿𑛊-𑜯𑜺-𑣟𑣪-𑱏𑱚-𖩟𖩪-𖭏𖭚-𝟍𝠀-𞥏𞥚-󯿿]*)$",^M<br>
                                  "type": "string"^M<br>
                          },^M<br>
                          "xs:NMTOKEN": {^M<br>
                                  "pattern":
"^([\\d\\--\\.\\:A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-޿ߊ-॥॰-৥ৰ-੥ੰ-૥૰-୥୰-௥௰-౥౰-೥೰-൥൰-෥෰-๏๚-໏໚-༟༪-ဿ၊-ႏႚ-៟៪-᠏᠚-᥅ᥐ-᧏᧚-᩿᪊-᪏᪚-᭏᭚-ᮯᮺ-᰿᱊-ᱏᱚ-῿<200c>-<200d>‿-⁀⁰Ⰰ-⿯、-ꘟꘪ-꣏꣚-ꤊ-ꧏ꧚-ꧯꧺ-꩏꩚-꯯꯺-퟿豈-﷏ﷰ-/:-�𐀀-𐒟𐒪-𑁥𑁰-𑃯𑃺-𑄵𑅀-𑇏𑇚-𑋯𑋺-𑑏𑑚-𑓏𑓚-𑙏𑙚-𑚿𑛊-𑜯𑜺-𑣟𑣪-𑱏𑱚-𖩟𖩪-𖭏𖭚-𝟍𝠀-𞥏𞥚-󯿿]+)$",^M<br>
                                  "type": "string"^M<br>
                          },^M<br>
                          "xs:NMTOKENS": {^M<br>
                                  "items": {^M<br>
                                          "pattern":
"^([\\d\\--\\.\\:A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-޿ߊ-॥॰-৥ৰ-੥ੰ-૥૰-୥୰-௥௰-౥౰-೥೰-൥൰-෥෰-๏๚-໏໚-༟༪-ဿ၊-ႏႚ-៟៪-᠏᠚-᥅ᥐ-᧏᧚-᩿᪊-᪏᪚-᭏᭚-ᮯᮺ-᰿᱊-ᱏᱚ-῿<200c>-<2d>‿-⁀⁰-↏Ⰰ-⿯、-ꘟꘪ-꣏꣚-ꤊ-ꧏ꧚-ꧯꧺ-꩏꩚-꯯꯺-퟿豈-﷏ﷰ-/:-�𐀀-𐒟𐒪-𑁥𑁰-𑃯𑃺-𑄵𑅀-𑇏𑇚-𑋯𑋺-𑑏𑑚-𑓏𑓚-𑙏𑙚-𑚿𑛊-𑜯𑜺-𑣟𑣪-𑱏𑱚-𖩟𖩪-𖭏𖭚-𝟍𝠀-𞥏𞥚-󯿿]+)$",^M<br>
                                          "type": "string"^M<br>
                                  },^M<br>
                                  "type": "array"^M<br>
                          }^M</p>
        <p>Here's a summary of X3DUOM:</p>
        <p>$ grep xs: X3dUnifiedObjectModel-4.0.xml|sort -u<br>
                             baseType="xs:ID"<br>
                             baseType="xs:IDREF"<br>
                             baseType="xs:NMTOKEN"<br>
                             baseType="xs:NMTOKEN"/><br>
                             baseType="xs:NMTOKEN"><br>
                            baseType="xs:NMTOKEN"<br>
                             baseType="xs:NMTOKENS"<br>
                      <containerField default="acousticProperties"
          type="xs:NMTOKEN"/><br>
                      <containerField default="appearance"
          type="xs:NMTOKEN"/><br>
                      <containerField default="attrib"
          type="xs:NMTOKEN"/><br>
                      <containerField default="bodies"
          type="xs:NMTOKEN"><br>
                      <containerField default="children"
          type="xs:NMTOKEN"/><br>
                      <containerField default="collider"
          type="xs:NMTOKEN"/><br>
                      <containerField default="contacts"
          type="xs:NMTOKEN"/><br>
                      <containerField default="coord"
          type="xs:NMTOKEN"/><br>
                      <containerField default="displacers"
          type="xs:NMTOKEN"/><br>
                      <containerField default="emitter"
          type="xs:NMTOKEN"/><br>
                      <containerField default="fillProperties"
          type="xs:NMTOKEN"/><br>
                      <containerField default="fogCoord"
          type="xs:NMTOKEN"/><br>
                      <containerField default="fontStyle"
          type="xs:NMTOKEN"/><br>
                      <containerField default="geometry"
          type="xs:NMTOKEN"/><br>
                      <containerField default="geoOrigin"
          type="xs:NMTOKEN"/><br>
                      <containerField default="joints"
          type="xs:NMTOKEN"/><br>
                      <containerField default="layers"
          type="xs:NMTOKEN"/><br>
                      <containerField default="layout"
          type="xs:NMTOKEN"/><br>
                      <containerField default="lineProperties"
          type="xs:NMTOKEN"/><br>
                      <containerField default="material"
          type="xs:NMTOKEN"/><br>
                      <containerField default="motions"
          type="xs:NMTOKEN"/><br>
                      <containerField default="periodicWave"
          type="xs:NMTOKEN"/><br>
                      <containerField default="physics"
          type="xs:NMTOKEN"/><br>
                      <containerField default="pointProperties"
          type="xs:NMTOKEN"/><br>
                      <containerField default="programs"
          type="xs:NMTOKEN"/><br>
                      <containerField default="renderStyle"
          type="xs:NMTOKEN"/><br>
                      <containerField default="shaders"
          type="xs:NMTOKEN"/><br>
                      <containerField default="texCoord"
          type="xs:NMTOKEN"/><br>
                      <containerField default="textureProperties"
          type="xs:NMTOKEN"/><br>
                      <containerField default="textureTransform"
          type="xs:NMTOKEN"/><br>
                      <containerField default="texture"
          type="xs:NMTOKEN"/><br>
                      <containerField default="trimmingContour"
          type="xs:NMTOKEN"/><br>
                      <containerField default="viewport"
          type="xs:NMTOKEN"/><br>
                <!-- For schema xs:simpleType with contained
          xs:enumeration definitions, follow naming convention of name
          ending in 'Type', 'Choices' (for strict enumeration set) or
          'Values' (for suggested tokens). --><br>
                      <Inheritance baseType="xs:boolean"/><br>
                      <Inheritance baseType="xs:double"/><br>
                      <Inheritance baseType="xs:float"/><br>
                      <Inheritance baseType="xs:integer"/><br>
                      <Inheritance baseType="xs:string"/></p>
        <p>containerField is not mentioned at all in my schema. xs: is
          not mentioned in my schema generator.</p>
        <p>I cannot extract patterns from X3DUOM if they don't exist.  I
          can add patterns to my schema generator, if someone puts them
          into JSON encoding.  I can add these patterns as text.</p>
        <p>There's even a good opportunity to reduce the number of
          patterns in X3dXml4.0SchemaConvertedToJson2020-12Schema.json:</p>
        <p>(venv)
          coderextreme@coderextreme-Kubuntu20:~/X3DJSONLD/src/main/schema$
          jsonlint X3dXml4.0SchemaConvertedToJson2020-12Schema.json|grep
          pattern|wc<br>
               96     192   39020<br>
          (venv)
          coderextreme@coderextreme-Kubuntu20:~/X3DJSONLD/src/main/schema$
          jsonlint X3dXml4.0SchemaConvertedToJson2020-12Schema.json|grep
          pattern|sort -u|wc<br>
               25      50    6183<br>
        </p>
        <p>John<br>
        </p>
        <div class="moz-cite-prefix">On 10/13/21 7:36 PM, Brutzman,
          Donald (Don) (CIV) wrote:<br>
        </div>
        <blockquote type="cite"
cite="mid:BY3PR13MB4884F5929DD074A4671A0141C4B89@BY3PR13MB4884.namprd13.prod.outlook.com">
          <meta http-equiv="Content-Type" content="text/html;
            charset=UTF-8">
          <meta name="Generator" content="Microsoft Word 15 (filtered
            medium)">
          <style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
          <div class="WordSection1">
            <p class="MsoNormal">The Altova XML Spy generated schema is
              not a solution, it is an example showing design patterns
              that may be useful.<o:p></o:p></p>
            <p class="MsoNormal"><o:p> </o:p> converted X3D JSON schema,
              would be my guess.</p>
            <div>
              <div>
                <div>
                  <blockquote style="border:none;border-left:solid
                    #CCCCCC 1.0pt;padding:0in 0in 0in
                    6.0pt;margin-left:4.8pt;margin-right:0in">
                    <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p></o:p></p>
                  </blockquote>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </blockquote>
    </blockquote>
  </body>
</html>