createNewRepeat method

void createNewRepeat(
  1. String xPath
)

Adds an instance to the repeat xPath (an unqualified reference).

Implementation

void createNewRepeat(String xPath) {
  final groupRef = getRef(xPath);
  if (!groupRef.isAmbiguous) {
    throw StateError('Provided xPath must be ambiguous');
  }
  final multiplicity = _evaluationContext.expandReference(groupRef)!.length;
  _createRepeat(groupRef.withMultiplicity(groupRef.size - 1, multiplicity));
}