Closed TomazErjavec closed 1 year ago
@TomazErjavec Can you give me a sample of the corpus where it makes a mess? I believe I only change the root language this way
xml:lang="mul"
now I see the issue - problem is in copying already factorized files:
I don't know the reason for copying lang in XInclude mode - I use this template/mode for copying xml files...
@TomazErjavec, Should I implement my own mode copyXInclude
which does not add xml:lang, or this template can be fixed?
My own mode will be probably safer, but I prefer less code duplication if possible...
@matyaskopp thanks for the fix.
don't know the reason for copying lang in XInclude mode
XInclude mode is meant only for fully expanding the corpus header, so that the variable containing it can be then used by templates that need corpus header metadata; the reason for having lang everywhere there is to make it simpler to know which language a certain element contains (without the clumsy ancestor-of-self::tei:*[@xml:lang][1]/@xml:lang
idiom).
Of course, all this was only in my head, but nowhere explained, so, sorry about that!
All ok now, closing.
It seems that the factorise script puts xml:lang on all elements in factorised files. I vaguelly remember we discussed this as a feature, and it might be in the taxonomies, but isn't in the listOrg or listPerson as:
Is it possible not to do this, or will it cause problems? If yes, maybe add-common content can remove them again...