Does the ../age_ts
change work in Collect?
I believe there's no way that /data/people/age_ts
would work in Enketo because Enketo will always use the first people
instance, as you observed. That is consistent with XPath evaluation rules. Collect has an additional extension that applies repeat instance context to an unqualified reference like /data/people/age_ts
but that's outside of standard XPath. For that reason, I do think that pyxform
should be generating a relative reference. I'm pretty sure that would work in Collect but it would be good to check.
Beyond that, it looks like Enketo has an issue with that relative reference that needs to be figured out. Maybe it's using the wrong evaluation context?