-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow EXTERNPROTO, PROTO inside MFNode in classic encoding #79
Comments
We talked about it on x3d-public this year, and the resolution was opposite. You cannot place such things ( I recall our thread on x3d-public had links to X3D specifications confirming this, and a discussion with consensus (as far as I understand) it should stay like it, don't change the spec. You have to place things like Testing, both view3dscene and tovrmlx3d report error about it for the classic encoding (.x3dv) version. The XML encoding (.x3d) doesn't have any issue. |
The email discussion and specification implications were carefully considered by the X3D Working Group and X3D specification editors. You will likely find further detail inside Mantis Issue Tracker noting key points. Thanks again for those earlier inputs. Once again X3D 4.0 Architecture abstract specification, which is now finalized, takes precedence for current work. Note also this content model for ExternProtoDeclare and ProtoDeclare statements inside a children list, is explicitly allowed in X3D Unified Object Model (X3DUOM), X3D XML Schema and XML DOCTYPE. Of course the primary design imperative remains throughout is for 19775-1 X3D Architecture to describe functionality, with corresponding specifications for each separate 19776-* file encoding and 19777-* programming-language binding describing specific implementation rules for that context. Therefore we need to craft prose and grammar modifications for revising X3D 19776-2 ClassicVRML Encoding for an update to match X3D Architecture 4.0. If you want to suggest them here, great. Please reopen the issue. The current approach is incorrect. We can then follow our regular standards-development process and post all such recommendations on x3d-public mailing list, for X3D Working Group consideration, with distilled rationales in Mantis Issue Tracker, and changes going into the X3D Specifications that are maintained by the Web3D Consortium on github. This due diligence using a proven process is how we have built all of our X3D improvements so successfully. Again thanks for careful attention to detail and working together to continue these success. |
I really think the current approach is correct.
The input testcase you show should just be fixed, IMHO. That's not a ticket for view3dscene, it's a ticket for that testcase author. The AD 1 (what we do follows current spec) is I think a "fact" -- that is, reading the current spec, https://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.html , the The AD 2 (whether we should change the spec) -- I realize this is more like "opinion". For me, the current spec (with We did talk about it in June this year, x3d-public mailing list "[x3d-public] Problem in x3dviewscene: ROUTE placement". Vincent confirmed my opinion, that changing spec was not desirable. Doug did tests on browsers, and some of them, just like CGE/view3dscene, follow the grammar strictly and don't permit ROUTE, EXTERNPROTO in MFString. If you want to pursue changing the spec, OK. Let's first get consensus on x3d-public among X3D browser developers. |
The upcoming ClassicVRML Encoding 4.0 specification will be changed to match the X3D 4.0 Architecture, so consensus is already achieved. This issue is mistakenly closed. |
…g, make sure to move ROUTEs to the end See castle-engine/castle-model-viewer#79
I don't see how the resolution can "match the X3D 4.0 Architecture". The X3D 4.0 Architecture doesn't say one can place EXTERNPROTO etc. in the middle of MFNode lists. The issue is independent of X3D 4.0 Architecture spec IMHO, it is just about classic encoding formal grammar. That said, I have implemented what I believe is the change you intended. I hope --- as I don't have access to the updated classic 4.0 specification you mention (it is not public as far as I see) and I don't have access to Mantis also anymore. I still think this is a bad spec change, but I have implemented it. The implementation and tests confirmed my fears, to be honest: This spec change introduces a weird set of situations, when EXTERNPROTO/PROTO/ROUTE/IMPORT/EXPORT are inside MFNode as far as syntax is concerned, but for browsers they are more logically inside the parent nodes of these MFNode fields. This introduces edge-cases when trying to save the resulting graph back. To be really "on the safe side" one could change browser definition of MFNode from a "list of nodes" but a "list of anything", but that's adding a significant complexity, so instead we place the EXTERNPROTO/PROTO/ROUTE/IMPORT/EXPORT inside parent node, and hope that the order on save will be correct. Which is tricky, as named nodes and protos may depend on each other. The testcase https://github.com/castle-engine/demo-models/blob/master/x3d/routes_protos_within_mfnode.x3dv explores these challenging cases. I'll posted about it to the x3d-public, so that other browser vendors may be prepared for it and may reuse my testcase https://github.com/castle-engine/demo-models/blob/master/x3d/routes_protos_within_mfnode.x3dv . |
The following scene
has
<Group DEF='PrototypeDeclarations'>
containing ExternProtoDeclare and ProtoDeclare statements. ClassicVRML validation yields errors likeInterestingly, view3dscene did not provide these warnings for either .x3d or .x3dv versions of the scene.
Deleting the ExternProtoDeclare yielded a similar error for the following ProtoDeclare statement.
These statements are allowed within an MFNode
children { ]
list and should not raise error flags.The text was updated successfully, but these errors were encountered: