Closed rausch-supola closed 1 month ago
Could this affect the rule in usg
context="tei:usg[not(@type = 'geographic') and not(@type='socioCultural')]"
as well?
So, we have several contexts and one element in a document might be matching several rules, right?
tei:cit[not(@type = 'example')]
tei:cit[@type = 'translationEquivalent']
tei:cit[@type = 'translation']
tei:cit[@subtype = 'proverb']
So we could copy those rules which are now in tei:cit[not(@type = 'example')]
to the other contexts - however, I feel duplicating the rules clutters the schema and makes it less readable.
Actually, I think, we have defined the same logic already in the <elementSpec>
for <bibl>
so probably we can remove it in the elementSpec for <cit>
, couldn't we? For clarity we can leave an XML comment, for example.
Actually, I started a pull request which solves the problem. It was a syntax error I guess: https://github.com/acdh-oeaw/generic-dict-schema/pull/7
<s:rule context="tei:cit/@type[not(. = 'example')]">
instead of
<s:rule context="tei:cit[not(@type = 'example')]">
That's why I mentioned that maybe it concerns the rule in usg as well because it is the same syntax. - after a check it seems here the rule is working correctly. How is that possible?
There is no error message or anything, simply the rules are not applied
Actually, I think, we have defined the same logic already in the
<elementSpec>
for<bibl>
so probably we can remove it in the elementSpec for<cit>
, couldn't we? For clarity we can leave an XML comment, for example.
I would go for this!
I removed the first rule in cit as it is already included in the listBibl rule set (https://github.com/acdh-oeaw/generic-dict-schema/commit/9cfcf7378738c14c20486cb19e2940febdd9ee0f)
the first rule prevents the following rules from being invoked