-
Notifications
You must be signed in to change notification settings - Fork 127
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
ODD compilation excludes model classes not explicitly included #596
Comments
Follow up: it seems that even including |
Precisely. If you modify the ODD to read
then model.persStateLike reappears in the generated schema. |
Yes, this can be seen in the verbose logs of
later:
then:
and finally:
|
So what do we (or at least you @raffazizzi & @lb42) think is the correct solution? Should we document the current behavior better (if you include an element but not its parents, the result probably is not what you expect), or change the current behavior (which would leave many schemas with lots of empty classes, but at least a user could add something to that class without difficulty)? |
I think the current behaviour is quite reasonable, once you understand that orphan elements (i.e. those with no possible parent) are always eliminated. The problem is that it's not very well explained. A previous version of Roma Classic included an additional "sanity check" which would alert the user to this and similar situations: might be worth thinking about including something like it in a future version. |
Consider the following
<schemaSpec>
:When its ODD gets compiled (e.g. via TEIGarage, which uses the Stylesheets), the definition for
<nationality>
will not includemodel.persStateLike
:To fix this, one can include the model explicitly with a
<classRef>
, but should it be included automatically?@lb42 pointed to this passage in the Guidelines:
What should be the right behavior here? This of course affects Roma, too. See TEIC/romajs#101
The text was updated successfully, but these errors were encountered: