[x3d-public] Possible issues with XML Encoding (XML Schema, X3DUOM) specifications.

John Carlson yottzumm at gmail.com
Sun Feb 25 11:21:07 PST 2024


As I suspected, after looking at web3d.org diagrams, the name field type is
indeed xs:NMTOKEN.   See X3DVertexAttributeNode.

There’s no xs:NMTOKEN class or validation done in x3d.py as Don says.  It’s
a bug that this stuff leaks into x3d.py current builds from (correct?)
X3DUOM.

I believe the correct place to repair this is probably the X3DPSAIL
stylesheets.  TBD at an  unknown time, possibly by the time of the Python
SAI spec.

I have patch my experimental X3DUOM to get around this, and used it with my
Blender exporter.

This means that people using my Blender exporter will not be able to
validate X3DVertexAttributeNode and subclasses, if they are used in a scene
and exported.

Which is somewhat good anyway, but these things will be caught by the
browsers.

Punt.  You have my approval to standardize XML schema and X3DUOM.

John

On Sun, Feb 25, 2024 at 7:39 AM John Carlson <yottzumm at gmail.com> wrote:

> Holger, please verify that:
>
> X3DVertexAttributeNode
> FloatVertexAttribute
> Matrix3VertexAttribute
> Matrix4VertexAttribute
>
> name field types are correct across XML Schema, specifications and X3DUOM.
>
> I'm possibly seeing 2 below issues in XML Schema (bold with red
> background, search for xs:NMTOKEN), with the former being most crucial. I
> have not validated the against the X3D4 architecture.  This issue creates
> problems in X3DUOM with children inheritors, which creates problems in
> x3d.py.
>
>  <xs:complexType name="X3DVertexAttributeNode" abstract="true">
>                 <xs:annotation>
>                         <xs:appinfo><xs:attribute name="name" type="
> *xs:NMTOKEN*" fixed="initializeOnlyField">
>                                         <xs:annotation>
>                                                 <xs:appinfo>name attribute
> is ordinarily required, unless this is a USE node</xs:appinfo>
>                                                 <!-- Design note: cannot
> REQUIRE @name field or else USE nodes incorrectly fail to validate -->
>                                                 <xs:documentation source="
> https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NameTyping
> "/>
>                                         </xs:annotation>
>                                 </xs:attribute><xs:attribute
> name="componentName" type="componentNameChoices"
> fixed="Shaders"/><xs:attribute name="componentLevel"
> type="xs:positiveInteger" fixed="1"/>
>                 Base type for all nodes that specify per-vertex attribute
> information to the shader.
>             </xs:appinfo>
>                         <xs:documentation source="
> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shaders.html#X3DVertexAttributeNode
> "/>
>                 </xs:annotation>
>                 <xs:complexContent>
>                         <xs:extension base="X3DGeometricPropertyNode">
>                                 <xs:attribute name="name" type="
> *xs:NMTOKEN*">
>                                         <xs:annotation>
>                                                 <xs:appinfo>name attribute
> is ordinarily required, unless this is a USE node</xs:appinfo>
>                                                 <!-- Design note: cannot
> REQUIRE @name field or else USE nodes incorrectly fail to validate -->
>                                                 <xs:documentation source="
> https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NameTyping
> "/>
>                                         </xs:annotation>
>                                 </xs:attribute>
>                         </xs:extension>
>                 </xs:complexContent>
>         </xs:complexType>
>
> Thanks!
>
> Let's get this nailed down before proceeding.  If this is right, then we
> need to patch X3DPSAIL builds (currently broken).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240225/24b6f8e7/attachment-0001.html>


More information about the x3d-public mailing list