TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

Processing attRefs for attribute list on element spec pages. Fixes #419 #585

Closed raffazizzi closed 1 year ago

raffazizzi commented 1 year ago

Thanks for this feedback, @sydb! The plot thickens: lem (which was the element I looked at for testing) is member of att.textCritical just as much as rdg is: they should both get @subtype from att.typed because att.textCritical uses attRef to cherry-pick it. So the stylesheet is doing exactly what I told it to do, as far as I can tell.

In short: lem and rdg are both members of att.textCritical, which cherry-picks with <attRef> @subtype from att.typed.

But actually the latest tei_all.rng does not allow @subtype on either of them. @subtype does not make it into the RNG definition of att.textCritical.attributes. So it looks like we have a new problem, right?

sydb commented 1 year ago

No, I think that (RNG does not have @subtype) is an old problem, which already has a ticket. (Will look for ticket # later.)

So while the Stylesheets may be doing exactly what you want (which, as I said, I am quite impressed with), I am not sure it is what we want them to do. Do we want the output of a cherry-pick like this to look the same as a <memberOf> and "change" (or "replace")? Maybe so. But I am not sure. Give me a night to sleep on it, as it were.

raffazizzi commented 1 year ago

We may want to find a way to distinguish inheritance via membership from inheritance via cherry-picking, somehow, but where the cherry-picked attribute comes from is important and should be shown.

In the spec pages for attribute classes, this is already shown; e.g. in att.textCritical you can already see:

att.written (@hand) att.typed (type, @subtype)

So I reproduced the same in element spec pages. I would say that for now this is fine so that this information is made available. We can then discuss how to distinguish these two forms of inheritance.

E.g. the new display on lem is:

For membership inheritance (NB lem is not a direct member of att.global.rendition)

att.global (@xml:id, @n, @xml:lang, @xml:base, @xml:space) (att.global.rendition (@rend, @style, @rendition))

For both membership and cherry-picked:

[att.textCritical]() (@type, @cause, @varSeq, @require) ([att.typed]() (type, @subtype)) ([att.written]() (@hand))

raffazizzi commented 1 year ago

@peterstadler the space problem should be fixed! Please double check when you get a chance and please merge if it looks good!

joeytakeda commented 1 year ago

Merging per Stylesheets mtg 2022-01-05