[x3d-public] x3dom prototypes, extern proto

Andreas Plesch andreasplesch at gmail.com
Tue Jun 23 18:10:45 PDT 2020


...
> The next step would be to support the ExternProtoDeclare statement.
> The main question I have is about the function of the additional field
> statements under ExternProtoDeclare.
>
> - Do they replace ProtoInterface field statements ? (No.)
> - Is the ProtoInterface element still required in the external file ? (Yes.)
> - Are they listed just for convenience (for the author and the browser) ? (Yes?)
> - Can they be ignored ? (Yes?)

I did find the clause "The names and types of the fields of the
interface declaration shall be a subset of those defined in the
implementation." in 4.4.5.2 EXTERNPROTO interface semantics. This
means that an ExternProto can restrict access to fields by not listing
them in its field elements. So they should not be ignored. On the
other hand a browser which ignores them would still generate the same
behaviour, minus warnings or errors in an ill-constructed scene when a
ProtoInstance is trying to set non-accessible fields.

So I think as a first cut, it is ok to just load the external
Protodeclaration and give it the name of the ExternProto and not doing
much or anything with the field elements.

> Thanks for any insight,
>
> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453

-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list