Hide Comments

Model Element References

Defined model elements such as Data Structures, Resource Definitions and Link Relations, are frequently referenced from other elements.  For example, a Data Structure may refer to an Enumeration as a Primitive Property type and a Resource Definition refers to its bound Data Structure. Such references have various different forms, rules and guidelines which are detailed below.

Element Names (Name)

The term 'Name' as used in this specification refers to an atomic model element name. Names MUST consist of a combination of upper or lower case letters, numbers and underscore characters matching the following regular expression:

^([a-z]|[A-Z]|[_])([a-z]|[A-Z]|[_]|[0-9])*

Names are used in a variety of contexts where they may or may not be qualified.

Qualified Element Reference (QName)

The term 'QName' as used in this specification is short for 'qualified Name' and means an appropriately qualified or unqualified Name, according to the rules for model element references documented below.  This usage is consistent with the XML usage of QName.  (XML QNames can be Namespace-prefixed or not; 'QName' just means that the Name MAY be qualified.)

Scoped Element Reference (SName)

The term 'SName' as used in this specification is short for 'scoped Name' and denotes a Name that is never qualified. For example, includedProperties listed in a Reference Link or Reference Embed; or scopes listed in a secured element.  Such model element references are never qualified because they occur in the scope of a referenced element, so there is no need to qualify them further.

Forms of Reference

Model element references use different forms, depending on the circumstances.

Form

Description

Syntax

Examples

Unqualified Name

The model element is referenced by its Name, without any qualification.

<element-name>

Replenishment

Model-Qualified Name

The model element is referenced by both its RAPID Model Name and its own Name. Only available for elements whose containing model is defined locally, within the same RAPID-model as the referrer.

<containing-model>.<element-name>

InventoryData.Replenishment

Alias-Qualified Name

The model element is referenced by an alias Name and its own Name. Only available when the element's containing model is imported with an alias.

<alias>.<element-name>

inv.Replenishment

Fully-Qualified Name

The model element is referenced by its RAPID Model Name, its containing model Name and its Name.

Note that if the referenced model element is defined in a RAPID Model that specifies a Namespace, the Namespace Name MUST be included in the fully-qualified element reference, as a prefix to the RAPID Model Name.

[<namespace>.]<rapid-model>.<containing-model>.<element-name>

With Namespace:

 

megafacture.mrp.MRPModel.InventoryData.Replenishment

 

Without Namespace:

 

MRPModel.InventoryData.Replenishment

Allowed and Preferred Reference Forms

The following table summarizes the allowed and preferred model element reference forms, according to the the circumstances.

Conformant RAPID-ML editors and processors MUST recognize all allowed forms.
Conformant RAPID-ML editors and validators MUST raise an error condition wherever a model element reference appears in a disallowed form.
Conformant RAPID-ML editors and generators SHOULD suggest the preferred form, as specified here.

Element Origin

Has Alias

Name Clash

Unqualified Form

Model-Qualified Form

Alias-Qualified Form

Fully Qualified Form

Local

N/A

No

Preferred

Allowed

N/A

Allowed

Local

N/A

Yes

Disallowed

Allowed

N/A

Preferred

Imported

No

No

Preferred

N/A

N/A

Allowed

Imported

No

Yes

Disallowed

N/A

N/A

Preferred

Imported

Yes

No

Preferred

N/A

Allowed

Allowed

Imported

Yes

Yes

Disallowed

N/A

Preferred

Allowed

Created with Help & Manual 6 and styled with Premium Pack Version 2.51 © by EC Software