-
Notifications
You must be signed in to change notification settings - Fork 8
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
when an element is included, Roma should (dynamically) select all classes it is a member of #101
Comments
Note to self: consider adding prompt to user (e.g. "do you also want to add all classes this element is a member of?") -- perhaps allow to choose model, atts, both |
@raffazizzi I confirm that in Roma-0.3.0 these problems are resolved when an element is added via Roma. For example, when Still, there's one glitch remaining: when an existing ODD is uploaded which only includes |
@rvdb I believe this is something outside of scope for Roma because the Stylesheets will exclude membership to classes that are not explicitly selected. Consider the following <schemaSpec ident="oddex1" start="TEI">
<moduleRef key="header"/>
<moduleRef key="core"/>
<moduleRef key="tei"/>
<moduleRef key="textstructure"/>
<moduleRef key="namesdates" include="nationality"/>
</schemaSpec> When it gets compiled by TEIGarage, the definition for <elementSpec xmlns:rng="http://relaxng.org/ns/structure/1.0" module="namesdates" ident="nationality">
<!-- ... -->
<classes>
<memberOf key="att.global"/>
<memberOf key="att.datable"/>
<memberOf key="att.editLike"/>
<memberOf key="att.naming"/>
<memberOf key="att.typed"/>
</classes>
<!-- ... -->
</elementSpec> This is the data the Roma gets, so it won't include To fix this, you can include the model explicitly (as you would have to do if you were writing the ODD by hand). If you select from the list of model classes, it will correctly show up in the element page. |
My understanding is that model classes should be included in an ODD if the module in which they are defined is included: it has nothing to do with whether or not a member element of the class is defined. In the case of model.persStateLike, it is declared in the basic tei module, and should therefore be available, but even if it were defined only in the namesdates module (as one might expect), it should still be available. The Guidelines are a bit coy on the matter : "The effect of a moduleRef element is to include in the schema all declarations provided by that module. This may be modified by means of the attributes include and except which allow the encoder to supply an explicit lists of elements from the stated module which are to be included or excluded respectively." they say : but this doesnt make explicit that "This may be modified..." applies only to elements, and that ipso facto other declarations in a module (such as classes or macros) are always included. So either I am misunderstanding this completely, or something has changed, or this is a bug in roma. |
Hi @lb42 , if that's the case, then this is a Stylesheet issue. Roma should operate with what comes back from the ODD compilation process. I can open an issue on the stylesheets repo and reference this one. |
@rvdb I also want to point out that attribute classes are included because they are all (or most) declared on the It is nonetheless something to consider, so I'm re-opening this issues, but removing it from the next release milestone. |
…. Prompted by exploration around issue #101
Hmm. But in fact model.persStateLike is declared in the module tei, not in the namesdates module. So something else is going on here. |
You're right @lb42 , then it's definitely because it gets removed at compilation, while the other attribute classes survive because they're used elsewhere. I think I'll bring this to issue to the Stylsheets group because I'm not sure whether we should adjust the compilation stylesheets to keep classes of elements that are explicitly included, or if Roma should do some heavy lifting in making up for (intentionally) lost data |
When an element is included, Roma should automatically load all of the model classes it is a member of.
This does not (always) seem to be the case. For example, if the
<nationality>
element is included in an ODD:When this ODD is loaded in Roma, the
Model Classes
section for the<nationality>
element is empty:Yet, TEI defines
<nationality>
as member of themodel.persStateLike
model class.When inspecting the
Model Classes
tab in Roma, themodel.persStateLike
class is not selected:Selecting this class will make it appear in the
Model Classes
section for the<nationality>
element in Roma.This is inconvenient, and inconsistent with Roma's handling of attribute classes. When an ODD file that includes the
<nationality>
element is loaded in Roma, the attribute classatt.editLike
is selected automatically in Roma.Note: While attribute classes for individual elements do seem to be loaded better than their model classes, Roma doesn't do this interactively. For example: when starting from an absolutely bare ODD, selecting
<nationality>
in Roma doesn't automatically load theatt.editLike
andmodel.persStateLike
classes. For both types of classes, it would be most convenient if they were selected dynamically in Roma's display upon selecting a member element.Unfortunately, I haven't been able to identify the exact trigger for this buggy display. It does happen when only one element from a module is included in an ODD (as with this example). Roma does properly select all attribute and element classes:
namesdates
module is included (without@include
attribute)namesdates
module are included individually in the@include
attributeThe text was updated successfully, but these errors were encountered: