<div dir="auto">Ah, that's weird.   I thought we just had a conversation where spaces are legal, and now I find them illegal.   You can find javaerrors.txt in the zip <a href="http://coderextreme.net/JavaCompile.zip">http://coderextreme.net/JavaCompile.zip</a> .   I would search for DEF, but there may be others.<div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 26, 2017 1:41 PM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks John.<br>
<br>
Please advise, what are some example NMTOKEN values you find failing?  Presumably DEF values...<br>
<br>
BTW this regex is pretty simple and is based on<br>
<br>
        X3D XML encoding, 4.3.4 DEF and USE attribute syntax<br>
        <a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#DEFAndUSEAttributeSyntax" rel="noreferrer" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19776-1/V3.3/<wbr>Part01/concepts.html#<wbr>DEFAndUSEAttributeSyntax</a><br>
<br>
        Extensible Markup Language (XML) 1.0 (Fifth Edition), 3.3.1 Attribute Types (specifically NMTOKEN)<br>
        <a href="https://www.w3.org/TR/REC-xml/#sec-attribute-types" rel="noreferrer" target="_blank">https://www.w3.org/TR/REC-xml/<wbr>#sec-attribute-types</a><br>
        and<br>
        3.3.3 Attribute-Value Normalization<br>
        <a href="https://www.w3.org/TR/REC-xml/#AVNormalize" rel="noreferrer" target="_blank">https://www.w3.org/TR/REC-xml/<wbr>#AVNormalize</a>      <br>
<br>
        X3D Classic VRML encoding, Annex A Grammar, A.2 General<br>
        <a href="http://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.html#General" rel="noreferrer" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19776-2/V3.3/<wbr>Part02/grammar.html#General</a><br>
=======<br>
nodeStatement ::=<br>
    node |<br>
    DEF nodeNameId node |<br>
    USE nodeNameId ;<br>
<br>
nodeNameId ::=<br>
    Id ;<br>
<br>
Id ::=<br>
    IdFirstChar |<br>
    IdFirstChar IdRestChars ;<br>
IdFirstChar ::=<br>
    Any ISO-10646 character encoded using UTF-8 except: 0x30-0x3a, 0x0-0x20, 0x22, 0x23, 0x27, 0x2b, 0x2c, 0x2d, 0x2e, 0x5b, 0x5c, 0x5d, 0x7b, 0x7d, 0x7f ;<br>
IdRestChars ::=<br>
    Any number of ISO-10646 characters except: 0x0-0x20, 0x22, 0x23, 0x27, 0x2c, 0x2e, 0x3a, 0x5b, 0x5c, 0x5d, 0x7b, 0x7d, 0x7f ;<br>
========<br>
<br>
and<br>
        X3D Scene Authoring Hints: Naming Conventions<br>
        <a href="http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/examples/X3dSceneAuthoringH<wbr>ints.html#NamingConventions</a><br>
<br>
<br>
Yes getting the most precise regex is important.  It can go in schema, which is reflected in X3DJSAIL, and also will help us improve the following preliminary-draft documentation.  Improvements welcome.<br>
<br>
        X3D Regular Expressions<br>
        <a href="http://www.web3d.org/specifications/X3dRegularExpressions.html" rel="noreferrer" target="_blank">http://www.web3d.org/specifica<wbr>tions/X3dRegularExpressions.<wbr>html</a><br>
<br>
If we find that the ClassicVRML constraints don't match XML NMTOKEN constraints, then we will need to align them or else content won't be portable.  In addition to X3D portability, any mismatches would negatively impact internationalization (i18n) and canonicalization/signature/enc<wbr>ryption of X3D.<div class="elided-text"><br>
<br>
<br>
On 1/26/2017 1:18 AM, <a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
These regular expression matches are causing a major stumbling block in the debugging of X3DJSAIL.   They should be replaced or fixed with something from X3D Schema (something which matches the standard).  There are more files which pass running in Java, but they fail when the files are diffed against the original.  I will work on creating a report on the diffs at some point (I may have to fix my Java serializer), but for now, we can work on this.<br>
<br>
CreateX3dSceneAccessInterfaceJ<wbr>ava.xslt:17409:                   !newValue.matches("[a-zA-Z_][<wbr>a-zA-Z_0-9]*")) // NMTOKEN character regex check<br>
<br>
CreateX3dSceneAccessInterfaceJ<wbr>ava.xslt:17427:                   !newValue.matches("[a-zA-Z_][<wbr>a-zA-Z_0-9]*")) // NMTOKEN character regex check<br>
<br>
CreateX3dSceneAccessInterfaceJ<wbr>ava.xslt:18339:                   !newValue.matches("[a-zA-Z_][<wbr>a-zA-Z_0-9]*")) // NMTOKEN character regex check</xsl:text><br>
</blockquote>
<br></div>
all the best, Don<font color="#888888"><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   <a href="tel:%2B1.831.656.2149" value="+18316562149" target="_blank">+1.831.656.2149</a><br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
</font></blockquote></div><br></div>