<div dir="auto">Cool, I just learned another way to use JSON schema:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit"><div style="color:rgb(10,10,10);font-family:"google sans","helvetica neue",sans-serif;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(240,242,245)"><div style="font-weight:500;letter-spacing:0px">json</div></div><div dir="ltr" style="font-size:inherit;line-height:22px;color:rgb(10,10,10);font-family:"google sans","helvetica neue",sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(240,242,245)"><pre><code>{
  <span style="color:rgb(24,128,56)">"type"</span>: <span style="color:rgb(24,128,56)">"object"</span>,
  <span style="color:rgb(24,128,56)">"properties"</span>: {
    <span style="color:rgb(24,128,56)">"propertyA"</span>: { <span style="color:rgb(24,128,56)">"type"</span>: <span style="color:rgb(24,128,56)">"string"</span> },
    <span style="color:rgb(24,128,56)">"propertyB"</span>: { <span style="color:rgb(24,128,56)">"type"</span>: <span style="color:rgb(24,128,56)">"string"</span> }
  },
  <span style="color:rgb(24,128,56)">"oneOf"</span>: [
    {
      <span style="color:rgb(24,128,56)">"required"</span>: [<span style="color:rgb(24,128,56)">"propertyA"</span>]
    },
    {
      <span style="color:rgb(24,128,56)">"required"</span>: [<span style="color:rgb(24,128,56)">"propertyB"</span>]
    },
    {
      <span style="color:rgb(24,128,56)">"not"</span>: {
        <span style="color:rgb(24,128,56)">"anyOf"</span>: [
          { <span style="color:rgb(24,128,56)">"required"</span>: [<span style="color:rgb(24,128,56)">"propertyA"</span>] },
          { <span style="color:rgb(24,128,56)">"required"</span>: [<span style="color:rgb(24,128,56)">"propertyB"</span>] }
        ]
      }
    }
  ],
  <span style="color:rgb(24,128,56)">"additionalProperties"</span>: <span style="color:rgb(147,52,230)">false</span>
}</code></pre></div></div><br></div><div dir="auto">Note that JSON schema is very good at distinguishing SFNode and MFNode.  XML schema, probably not so hot.  Feel free to catch SFNode versus MFNode in XML schema, so I don’t have to deal with the issues.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Mar 27, 2026 at 8:07 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Replacing USE with DEF would massively improve the JSON schema.   I vote for that!   It would massively improve the error reporting as well.<div dir="auto"><br></div><div dir="auto">What does FreeWRL think?</div><div dir="auto"><br></div><div dir="auto">No need for two attributes for the same meaning.</div><div dir="auto"><br></div><div dir="auto">USE and DEF code be used interchangeably, and container fields could specify parents.</div><div dir="auto"><br></div><div dir="auto">The only problem I see is when USE and DEF are used together, but that’s already an issue.</div><div dir="auto"><br></div><div dir="auto">John</div>
</blockquote></div></div>