docs: function build(recordTypes, recordTypeName, patch) {
  
  	// get the record type descriptor
  	if (!recordTypes.hasRecordType(recordTypeName))
  		throw new common.X2UsageError(
  			`Unknown record type ${recordTypeName}.`);
  	const recordTypeDesc = recordTypes.getRecordTypeDesc(recordTypeName);
  
  	// make sure the patch spec is an array
  	if (!Array.isArray(patch))
  		throw new common.X2SyntaxError('Patch specification is not an array.');
  
  	// process patch operations
  	const involvedPropPaths = new Set();
  	const updatedPropPaths = new Set();
  	const patchOps = patch.map((patchOpDef, opInd) => parsePatchOperation(
  		recordTypes, recordTypeDesc, patchOpDef, opInd,
  		involvedPropPaths, updatedPropPaths));
  
  	// return the patch object
  	return new RecordPatch(patchOps, involvedPropPaths, updatedPropPaths);
  }