Project

General

Profile

CIM Issues #7232

Move IRI primitive type from "Dynamics" into "Base > Domain"

Added by Todd Viegut 10 days ago. Updated 10 days ago.

Status:
Open
Priority:
High
Author/Contact Info:
Todd Viegut
Base Release:
CIM17
Solution to be Applied To:
CIM18
Solution Version:
Solution Applied By:
Completion Date:
CIM Keywords:
61970-Domain, 61970-Dynamics
Breaking Change:
Breaking Change Description:
CIM Impacted Groups:
None
Requestor:
Standard(s):
Version:
Clause:
Sub-Clause:
Paragraph:
Table:
Originally Closed in Version:
Origination Date:
Origination ID:
Originally Assigned To:

Description

Currently there exists a <<Primitive>> IRI type that was introduced as part of the 457 modeling work. This should have been defined in the Domain package with the rest of our primitives.

Additionally the W3Contology package (located under the InfGrid) also has an IRI type defined. This results in two definitions of IRI as of CIM18. This violates "Rule040: All classes shall have unique names. The package containment hierarchy shall not be used in uniquely identifying a class." This poses an issue for our tooling and should addressed in the CIM18v16. Rule040 does not just apply to normative CIM but the overall model (including Inf* packages) if such Inf* packages and classes are included alongside normative CIM. I have gone ahead and surveyed three vendor/products to confirm whether or not they include the Inf* packages in their product schemas and the answer was "Yes".

This was flagged during generation of a validation report on import of the schema in CIMTool as new primitives must be evaluated and programmatically updated.

Below reflects the introduction of the IRI primitive domain type in CIM18.

1. IRI in XSD 1.0

XSD 1.0 does not define a separate type for IRIs.

However, IRIs can be used with anyURI, but they must be converted to a valid
URI using percent-encoding.

This is because anyURI follows RFC 2396 (URIs), which only allows ASCII characters.

2. XSD 1.1 and IRI Support

In XSD 1.1, anyURI aligns with IRI (RFC 3987), allowing Unicode characters.

This means in XSD 1.1, anyURI can accept both URIs and IRIs, making explicit IRI support unnecessary.

Here is a basic XSD 1.0 example validating IRI values using xs:string with a pattern:

<xs:element name="resourceIRI" type="IRI"/>

<xs:simpleType name="IRI">
   <xs:restriction base="xs:string">
      <!-- Basic pattern matching IRI-style strings (e.g., http/https) -->
      xs:pattern value="https?://.+"/>
   </xs:restriction>
</xs:simpleType>

Here is a basic XSD 1.1 example validating IRI values using xs:anyURI with a pattern:

<xs:element name="resourceIRI" type="IRI"/>

<xs:simpleType name="IRI">
   <xs:restriction base="xs:anyURI">
      <!-- Optional: Basic IRI pattern using Unicode ranges -->
      <xs:pattern value="[\i-[:]][\c-[:]]*"/>
   </xs:restriction>
</xs:simpleType>

The CIM Modelling Guidelines website and document should be updated to have additional rules to further make explicit that all classes (primitives, compounds, etc.) in the Inf* packages, extension packages, etc. must also be unique. CIM MMs should note to check any new Inf* packages for duplicate types when they are to be merged into the normative CIM.


Proposed Solution

Proposal is to:

  • Move IRI primitive type to the Domain package under Grid.
  • Update the CIM Modelling Guidelines to provide more explicit directives on these areas.
  • Updates as needed to CIMTool, etc for XSD type alignment.

Also available in: Atom PDF