[X3D-Public] IMPORT / EXPORT allowed inside the node in classic encoding?

Michalis Kamburelis michalis.kambi at gmail.com
Fri Apr 9 22:40:20 PDT 2010


In X3D classic encoding, are IMPORT / EXPORT clauses allowed only at the
top-level, or are they OK inside the nodes too? That is, should this be
considered valid:

...
DEF I1 Inline {
  url "someurl.x3d"
}

Group {
  children DEF PI PositionInterpolator { ... }
  IMPORT I1.rootTransform AS I1Root
  ROUTE PI.value_changed TO I1Root.set_translation
}

I didn't find anything in the core X3D or classic encoding
specifications about this, except the grammar rules of classic encoding.

http://www.web3d.org/x3d/specifications/ISO-IEC-19776-2.2-X3DEncodings-ClassicVRML/Part02/grammar.html

These grammar rules clearly state that IMPORT / EXPORT are *not* allowed
inside nodes:
- "importStatement" / "exportStatement" are possible where "statement"
is possible, which is inside "x3dScene"
- inside the node, only "nodeBodyElement" are allowed. Which (besides
normal fields etc.) include routes, prototypes, but not import / export
stuff.

On the other hard, in XML encoding it seems OK to have <IMPORT> or
<EXPORT> inside the nodes (xsd schema allows this, if I read it
correctly). Also example
http://www.web3d.org/x3d/content/examples/Basic/development/ImportExportSyntax.x3d
uses it.

So, is this a deliberate limitation of X3D classic encoding? Or just a
mistake in classic encoding spec, and the grammar should be fixed to
allow IMPORT/EXPORT inside "nodeBodyElement"?

Michalis



More information about the X3D-Public mailing list