NIEM / NIEM-NDR

The NIEM Naming and Design Rules
https://niem.github.io/NIEM-NDR/
6 stars 6 forks source link

Definition of augmentation should use "or", not "and" #26

Closed cdmgtri closed 4 years ago

cdmgtri commented 7 years ago

Definition of augmentation:

An augmentation is an element that

  1. is a child of an element that is an instance of an augmentable type, and
  2. is a member of the substitution group of the augmentation point element declaration for the augmentable type.

Believe the definition should be 1 or 2, not 1 and 2.

webb commented 7 years ago

I think that what's not clear here is that an augmentation is an element in an instance. So, (1) in the instance, it's a child (has-a) of an element instance of an augmentable type.

Part 2 is the wrong one, in that it should say that its element declaration is in the substitution group for the augmentation point. As it is, it confuses the element (1) with the element declaration (2).

Suggest revising the text to clarify that an augmentation is an instance element, and revise (2) to refer to the element declaration of the element.

cdmgtri commented 7 years ago

@webb

I think what threw me off was the preceding paragraph:

The term augmentation describes any element in a NIEM-conformant instance XML document that appears as a result of being substituted for an augmentation point element. Such an element may have a type that is an augmentation type, or it may be a direct element that represents a property.

I read the two parts of the definition as corresponding to the two parts of the previous sentence - e.g., an augmentation could be either j:PersonAugmentation (an aug point substitution with an augmentation type) or j:PersonXYZCode (a direct aug point substitution).

Looking at it again, I can tell my first reading of it was wrong, but it is still a little confusing. Is Part 1 necessary? Would Part 2 be sufficient? Isn't j:PersonAugmentation still an augmentation, whether or not it is actually used in an instance (is a child of nc:Person)?

webb commented 6 years ago

See mike's comment on the commit for this issue for an edit to make.