I meant that using whatever `@xml:lang` found in the descendants could create non-intended results. E.g. a doc which doesn't specify a primary language but contains a quote in latin somewhere with an explicit `@xml:lang`. The resulting language w/b set as latin, although in this case it s/b set to the default `en` ?

In other words, I'm suggesting to look at only top-level languages, not deep in the markup. This could save some time too.