-
Notifications
You must be signed in to change notification settings - Fork 57
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
add choice element to NXDL #619
Comments
See the two examples of |
created branch "choice_element_619" for this work |
This has code (in a branch), so should probably go into the next milestone, if possible. |
@matthew-d-jones , @zjttoefs , @mkoennecke The example code shows:
To ensure that the
Now, the |
test the revised schema using this command:
|
before we close this ticket, delete the test file and update the documentation |
|
These revisions will apply ``choice`` only to groups. Is there any __need__ to apply it to fields, as well? Not sure I see the value in that now.
There is no need for The changed syntax to me isn't better or worse for this current use case. I've not looked into it in detail, but it does not less flexible. Can you only have a choice between things that are supposed to have the same name now? I can come up with a good example, but for transitioning to newer versions of the definitions you could have a |
Your example of a this-or-that choice with different names is already covered by the existing NXDL Schema, isn't it? One defines the two components and makes them both optional. The existing NXDL Schema does not cover the case where we must have one or the other. |
As part of adding new geometry definitions to
NXdetector
, it is proposed to extend the NXDL to allow for specification of multiple choices for a named group or field.The proposed use seems clear, to create a group with a defined name that is one specific NXDL class from a list of possibilities. The immediate children of the
<choice>
should all be of the same type (either all<field>
or all<group>
elements) and all should have the same@name
attribute.The text was updated successfully, but these errors were encountered: