[x3d-public] meta @name illegal value, X3DJSAIL regexp or ChemicalMarkupLanguage examples?

Don Brutzman brutzman at nps.edu
Mon Feb 6 23:55:44 PST 2017


OK the regex constraint for NMTOKEN on <meta name="embedded whitespace"/> has been removed.

Similarly for MetadataString etc. nodes and CAD nodes: no strictness on whitespace or NMTOKEN.  The assumption is that the names for such metadata might come from a completely diverse set of sources; it would be unreasonable to have such content immediately invalid, or require special mangling of the name values (short-circuiting their value).

prototype, field, fieldValue, component, unit and HAnim name attributes all include the NMTOKEN check, because when values are defined (e.g. for humans) we are exceedingly strict in those cases.

This is all matching schema and DTD and tooltips.

Again thanks for identifying this issue during validation testing.


On 2/6/2017 12:44 AM, Don Brutzman wrote:
> Other than meta name, other name attributes in X3d have type NMTOKEN.
>
> HTML5.1 sayeth
>
> 4.2.5. The meta element
> https://www.w3.org/TR/html/document-metadata.html#the-meta-element
> ======================================
> If a meta element has a name attribute, it sets document metadata. Document metadata is expressed in terms of name-value pairs, the name attribute on the meta element giving the name, and the content attribute on the same element giving the value. The name specifies what aspect of metadata is being set; valid names and the meaning of their values are described in the following sections. If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.
> ======================================
>
> so no restriction on HTML meta name values, and we shouldn't deviate from that.
>
> I'll work on relaxing that rule... but not tonite!
>
> btw I've gotten most of the way through a native DOM loader of .x3d documents (and hopefully fragments) today.  still feeling my way through reflection to turn the DOM document tree into an X3DJSAIL object tree.  hall of mirrors...
>
>
> On 2/5/2017 9:16 PM, yottzumm at gmail.com wrote:
>> More on regexps with meta names or examples names.  Are spaces allowed in meta @name?  Or are the examples wrong?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> John
>>
>>
>>
>>
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/AceticAcid.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.AceticAcid.main(AceticAcid.java:104)
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Alanine.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.Alanine.main(Alanine.java:104)
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/ButanedioicAcid.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.ButanedioicAcid.main(ButanedioicAcid.java:104)
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Caffeine.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.Caffeine.main(Caffeine.java:104)
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Cholesterol.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.Cholesterol.main(Cholesterol.java:104)
>>
>> www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Cortisone.java
>>
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: meta name newValue="CML version" has illegal value, must use a valid name string.
>>
>>         at org.web3d.x3d.java.Core.metaObject.setName(metaObject.java:506)
>>
>>         at www_web3d_org.x3d.content.examples.Basic.ChemicalMarkupLanguage.Cortisone.main(Cortisone.java:104)
>>
>
>
> all the best, Don


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list