Descriptor references have targets that are either in the Descriptor (internal references) or outside of the Descriptor (external references). The target of a Descriptor reference can be a file or content element in an XML file.

Three mechanisms are used for file and content references in a Descriptor:

Relationship references define references between files and are located in special Common Services files with the file name extension “.rels”. The reference source is defined by the file name where the relationship definition is located. For the reference targets, the URI syntax is used. The reference targets can be internal or external to the Descriptor. This is denoted by the “TargetMode” attribute. Every relationship reference shall have a valid XML identifier of type xs:ID (see ISO/IEC 29500-2:2021 clause 6.5.3.4).

All Information  Model attachment and embedded Descriptors in a Descriptor shall be the target of a relationship reference, and all these files shall be reachable from the Root AML files via relationship references. The relationship references in a Descriptor shall form a Directed Acyclic Graph with the Root AML files as the starting points and with all Information Model, attachments, and embedded Descriptors in a Descriptor referenced from the Root AML files either directly or indirectly (i.e., over a chain of references). There shall be no circular dependencies between the files in a Descriptor. For more details, see IEC 62714-1.

For relationship references to a Descriptor, the Pack URI syntax shall be used to reference individual files in the container.

Some examples for relationship references:

  • Example of an internal relationship reference from a file “configuration.AML” to a file “library.AML” (The relationship is contained in the file “configuration.AML.rels”):

<Relationship Type=“http://schemas.automationml.org/container/relationship/Library” Target=“file:///library.AML” TargetMode=“Internal” Id=“R725e8e211760485b”/>

  • The same example for an external relationship reference:

<Relationship Type=“http://schemas.automationml.org/container/relationship/Library” Target=“http://test.org/library.AML” TargetMode=“External” Id=“725e8e211760486b”/>

  • Example of an internal relationship reference from a file “configuration.AML” to an attachment file “manual.pdf” (The relationship is contained in the file “configuration.AML.rels”):

<Relationship Type=“http://schemas.automationml.org/container/relationship/AnyContent” Target=“file:///attachments/manual.pdf” TargetMode=“Internal” Id=“725e8e211760486c”/>

  • Example of an external relationship reference from a file “configuration.AML” to a Descriptor “SensorProduct.amlx” (The relationship is contained in the file “configuration.AML.rels”).

<Relationship Type=“http://schemas.automationml.org/container/relationship/AnyContent” Target=“http://vendor.org/SensorProduct.amlx” TargetMode=“External” Id=“R725e8e211760487b”/>

  • Example of an external relationship reference from a file “configuration.AML” to a file contained in the Descriptor “SensorProduct.amlx” (The relationship is contained in the file “configuration.AML.rels”).

<Relationship Type=“http://schemas.automationml.org/container/relationship/AnyContent” Target=“pack://http%3c, ,vendor.org,SensorProduct.amlx/attachments/sensor.jpg”TargetMode=“External” Id=“R725e8e211760488b”/>

AutomationML ExternalDataReferences interfaces allow one to define references from XML content inside of an AML file to non-AML files.

ExternalDataReferences interfaces shall be used if the reference target is not an AML file. The target can be inside or outside of the Descriptor.

For defining the reference target, the URI syntax, including the Pack URI syntax for reference targets that are contained in Descriptors, shall be used.

For a concrete reference, an interface shall be used that is either an ExternalDataReference or derived from ExternalDataReference.

An example of an ExternalDataReference to a document contained in a Descriptor is shown in Figure 18, with the code following the figure.

image021.png

Figure 18 – Example of an ExternalDataReference in a Descriptor

<ExternalInterface

 Name=“ManualReference”

 ID=“4db4782f-98f2-42a0-a10b-11b3ac7d014d”

 RefBaseClassPath=“AutomationMLInterfaceClassLib/AutomationMLBaseInterface/

ExternalDataConnector/ExternalDataReference” xmlns=”http://www.dke.de/CAEX”>

 <Attribute

    Name=“refURI”

    AttributeDataType=“xs:anyURI”

    RefAttributeType=“AutomationMLBaseAttributeTypeLib/refURI”>

    <Value>file:///attachments/manual.pdf</Value>

 </Attribute>

 <Attribute

    Name=“MIMEType”

    AttributeDataType=“xs:string”

    RefAttributeType=“AutomationMLBaseAttributeTypeLib/MIMEType”>

    <Value>application/pdf</Value>

 </Attribute>

</ExternalInterface>

For references between AutomationML Information Model files, the ExternalReference mechanism of AutomationML shall be used.

ExternalReference is defined in the CAEX specification (IEC 62424:2016, A.2.12, CAEX).

ExternalReferences are contained in the AutomationML file from where the reference starts.

The target of an ExternalReference is an AML object contained in an AML file. The target can be inside or outside of the Descriptor.

For defining the reference target, each ExternalReference shall provide a valid URI to the AML file and an alias, which shall be unique within the file where the reference starts. The URI can also be a Pack URI syntax for reference targets that are contained in Descriptors.

The alias may be used for referencing classes or instances. In this case, the reference tag shall begin with the alias name, followed by the alias separator “@”, followed by the path to the referenced class or the ID of the referenced InternalElement or ExternalInterface.

  • Example of an ExternalReference definition in an AutomationML file to an external AML library file:

<ExternalReference Path=“http://test.org/library.AML” Alias=“Library” />

The alias is used as an abbreviation when a reference is defined, as shown in the next example:

<InternalElement Name=“test” ID=“a1762231-6647-49a3-bbee-5a7df47d738a” RefBaseSystemUnitPath=“Library @[SUC_http://opcfoundation.org/UA/FX/AC]/[AutomationComponentType]”>

  • Example of an ExternalReference definition in an AutomationML file to an SUC in an OPC UA FX AML library file that is contained in a Descriptor that is stored externally:

<ExternalReference Path=“pack://http%3c, ,test.org,OpcUaFxAmlLibraries.amlx/MyOpcUaFxAmlLibrary.AML”Alias=“MyOpcUaFxAmlLibrary” />

The alias is used as an abbreviation when a reference is defined, as shown in the next example:

<InternalElement Name=“test” ID=“a1762231-6647-49a3-bbee-5a7df47d738a” RefBaseSystemUnitPath=“MyOpcUaFxAmlLibrary@[SUC_http://mynamespace.org/UA/FX/AC]/[MyAutomationComponentType] ”>…