in some cases xpath build in MCRXPathBuilder is not unique

Description

We use subselect in xed:repeat combined with xpath as parameter. See resulting XML:

MCRXPathBuilder.buildPositionPredicate() only adds position bracket if it is second element or third ....

This leads to problems if xpath parameter means first occurance of mods:name instead of all occurances of mods:name. So in the above described case we need mods:name[1] as xpath instead of mods:name.

Environment

None

Activity

Show:
Frank Lützenkirchen
May 6, 2020, 10:06 AM

Can be fixed by changing line 115 from
return (pos == 0 ? "" : "[" + ++pos + "]");
to
return "[" + ++pos + "]";

Assignee

Frank Lützenkirchen

Reporter

Kathleen Neumann

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

Medium
Configure