Skip to content
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

Adding att.global.rendition has no effect #174

Open
dirkroorda opened this issue Dec 2, 2024 · 4 comments
Open

Adding att.global.rendition has no effect #174

dirkroorda opened this issue Dec 2, 2024 · 4 comments
Assignees

Comments

@dirkroorda
Copy link

dirkroorda commented Dec 2, 2024

I want to make a TEI customization for drama. But the TEI drama module switches off the rendition attributes. So I want to customize them in. But that has no effect on the resulting rng.

Steps I did:

  1. Emptied the browser cache.
  2. Started a customization on roma.tei-c.org
  3. selected TEI-with-drama as the starting point, name drama-bare
  4. downloaded the odd and rng files.
  5. Emptied the browser cache.
  6. Started a customization on roma.tei-c.org
  7. selected TEI-with-drama as the starting point, name drama-rend
  8. Customized by selecting on the Attributes page the att.global.rendition checkbox
  9. downloaded the odd and rng files

Now I compared the odd files for drama-bare and drama-rend.
The only difference (apart from name and date) is:

 <classRef key="att.global.rendition"/>

So, the selection has some effect.

But when I look up the definition for att.global in drama-rend, it is exactly as in drama-bare, namely:

<define name="tei_att.global.attributes">
      <ref name="tei_att.global.linking.attributes"/>
      <ref name="tei_att.global.attribute.xmlid"/>
      <ref name="tei_att.global.attribute.n"/>
      <ref name="tei_att.global.attribute.xmllang"/>
</define>

No inclusion of tei_att.global.rendition.attributes, as in the complete tei rng.

Am I missing something?

@raffazizzi
Copy link
Contributor

raffazizzi commented Dec 3, 2024

Hello @dirkroorda thanks for reporting this. The reason this isn't working is because the classSpec in the original drama ODD explicitly redefines att.global to exclude att.global.rendition (note how att.global.rendition isn't listed in <classes>):

<classSpec module="tei" xml:id="GLOBAL" type="atts" ident="att.global" mode="change">
          <desc xml:lang="en" versionDate="2014-01-12">provides a set
          of attributes common to all elements in the
          <name>tei_drama</name> customization of the TEI encoding
          scheme.</desc>
          <classes>
            <memberOf key="att.global.linking"/>
            <memberOf key="att.global.analytic"/>
          </classes>
          <attList>
            <attDef ident="xml:space" usage="opt" mode="delete"/>
            <attDef ident="xml:base" usage="opt" mode="delete"/>
          </attList>
        </classSpec>

So while restoring att.global.rendition with <classRef> brings the class back, att.global still excludes it.

I think Roma should be able to detect and handle this situation, so I'll work on it, but it may take a bit of time.

@raffazizzi
Copy link
Contributor

@dirkroorda I am going to explain a bit more what may be needed here and I hope to get your perspective on this.

Since att.global is explicitly customized to exclude att.global.rendition, I'm not sure restoring att.global.rendition in the members list should automatically result in a change to att.global. What if that change was intentional? The only reason why it doesn't seem intentional now is that you are starting from a pre-existing customization. It seems like an overreach to undo something that the customization explicitly defines.

On the other hand it's confusing to restore a class but not have it appear where expected. Perhaps these cases should be detected and listed and result in something like this?
image

Also the current view for att.global is misleading when the class is restored; this is definitely a bug that needs addressing no matter what it's decided for the larger class membership issue.

Before restoring att.global.rendition:
image

After restoring att.global.rendition, membership to the class is incorrectly listed!
image

If you have any more thoughts or suggestions on what the expected behavior should be here let me know.

@raffazizzi raffazizzi reopened this Dec 3, 2024
@dirkroorda
Copy link
Author

dirkroorda commented Dec 4, 2024

Hi @raffazizzi, thanks for responding!

I thought something like this was the case, that I was fighting against something under the hood (the hood being the pre-existing customization).

I was able to get where I wanted by starting minimal, and then adding elements, especially the elements from the drama module, and a choice of other elements that I need.

@dirkroorda
Copy link
Author

I think it would help if it was documented that if you use a pre-existing customization you can not add/delete elements and attributes at lib, that your mileage may vary and that you can always start minimally and add stuff by hand.

Once you get the hang of seeing which TEI modules contribute which elements, it becomes really easy to add all elements of the drama module, for example.

raffazizzi added a commit that referenced this issue Dec 10, 2024
…ss is restored to the module (but not to the clas). Refs #174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants