<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:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Ebrima;
        panose-1:2 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Javanese Text";
        panose-1:2 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Leelawadee UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Microsoft Himalaya";
        panose-1:1 1 1 0 1 1 1 1 1 1;}
@font-face
        {font-family:"Microsoft New Tai Lue";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Microsoft Tai Le";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Mongolian Baiti";
        panose-1:3 0 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Myanmar Text";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Nirmala UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Segoe UI Historic";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"Segoe UI Symbol";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
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;}
.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" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Regular expressions are icing on top of the gravy and an extra independent layer of validation checking string patterns for simple types (well-formed floats etc.) so not necessary for most element/attribute evaluation.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">All of the detail is in the schema, meanwhile HelloWorld.json is almost certainly correct given all the torment it has received.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We can report issues to (a) Altova or (b) AJV if you think it worthwhile.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d press on.  It is always interesting to see how other tools work.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">all the best, Don<br>
<span style="font-size:10.0pt;font-family:"Courier New"">-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu<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">
http://faculty.nps.edu/brutzman</a></span><o:p></o:p></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>Tuesday, October 12, 2021 12:52 AM<br>
<b>To: </b><a href="mailto:brutzman@nps.edu">Brutzman, Donald (Don) (CIV)</a>; <a href="mailto:x3d-public@web3d.org">
X3D Graphics public mailing list</a><br>
<b>Subject: </b>Re: renewed development of X3D JSON support</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">NPS WARNING: *external sender* verify before acting.<br>
<br>
<br>
I've put the converted schema through the Ajv 8 validator. Here's what<br>
I've gotten so far, with HelloWorld.json.  I don't know if the problem<br>
stems from Ajv or the schema, or the HelloWorld.json.  One reason why I<br>
had to take out pattern match was the XML Schema regular expressions<br>
were not the same as the JavaScript regular expressions.  I'm not sure<br>
how portable regular expressions are between encodings, in other words.<br>
Any I don't really know what XMLSpy has done.  Maybe check documentation<br>
about regexps on Altova's website.<br>
<br>
John<br>
<br>
<br>
~/x3dschema$ node validatex3djson.js<br>
/c/x3d-code/www.web3d.org/x3d/content/examples/HelloWorld.json<br>
Failed JSON parse<br>
/c/x3d-code/www.web3d.org/x3d/content/examples/HelloWorld.json<br>
SyntaxError: Invalid regular expression:<br>
/^([\d\--\.\:A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-޿<span style="font-family:Ebrima">ߊ</span>-<span style="font-family:"Nirmala UI",sans-serif">॥॰</span>-৥<span style="font-family:"Nirmala UI",sans-serif">ৰ</span>-੥<span style="font-family:"Nirmala UI",sans-serif">ੰ</span>-૥<span style="font-family:"Nirmala UI",sans-serif">૰</span>-୥<span style="font-family:"Nirmala UI",sans-serif">୰</span>-௥<span style="font-family:"Nirmala UI",sans-serif">௰</span>-౥౰-೥೰-൥<span style="font-family:"Nirmala UI",sans-serif">൰</span>-෥෰-<span style="font-family:"Leelawadee UI",sans-serif">๏๚</span>-໏໚-<span style="font-family:"Microsoft Himalaya"">༟༪</span>-<span style="font-family:"Myanmar Text",sans-serif">ဿ၊</span>-<span style="font-family:"Myanmar Text",sans-serif">ႏႚ</span>-៟៪-᠏<span style="font-family:"Mongolian Baiti"">᠚</span>-᥅<span style="font-family:"Microsoft Tai Le",sans-serif">ᥐ</span>-᧏<span style="font-family:"Microsoft New Tai Lue",sans-serif">᧚</span>-᩿᪊-᪏᪚-᭏᭚-ᮯᮺ-᰿᱊-ᱏ<span style="font-family:"Nirmala UI",sans-serif">ᱚ</span>-῿-<span style="font-family:"Segoe UI Symbol",sans-serif">‿</span>-<span style="font-family:"Segoe UI Symbol",sans-serif">⁀</span>⁰-↏<span style="font-family:"Segoe UI Historic",sans-serif">Ⰰ</span>-⿯<span style="font-family:"MS Gothic"">、</span>-<span style="font-family:Ebrima">ꘟꘪ</span>-꣏꣚-ꤊ-<span style="font-family:"Javanese Text"">ꧏ</span>꧚-ꧯꧺ-꩏꩚-꯯꯺-퟿<span style="font-family:"Yu Gothic",sans-serif">豈</span>-﷏ﷰ-<span style="font-family:"MS Mincho"">/:</span>-�𐀀-𐒟𐒪-<span style="font-family:"Segoe UI Historic",sans-serif">𑁥</span>𑁰-𑃯𑃺-𑄵𑅀-𑇏𑇚-𑋯𑋺-𑑏𑑚-𑓏𑓚-𑙏𑙚-𑚿𑛊-𑜯𑜺-𑣟𑣪-𑱏𑱚-𖩟𖩪-𖭏𖭚-𝟍𝠀-𞥏𞥚-󯿿]+)$/:<br>
Invalid escape<br>
     at new RegExp (<anonymous>)<br>
     at usePattern<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/vocabularies/code.js:72:14)<br>
     at Object.code<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/vocabularies/validation/pattern.js:19:109)<br>
     at keywordCode<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:454:13)<br>
     at<br>
/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:222:17<br>
     at CodeGen.code<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/codegen/index.js:439:13)<br>
     at CodeGen.block<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/codegen/index.js:568:18)<br>
     at iterateKeywords<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:219:9)<br>
     at groupKeywords<br>
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:200:13)<br>
     at<br>
/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:192:13<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>