NodeSet merge tool: Alias support is incomplete

Description

The support of Aliases in nodeset is incomplete in nodeset_address_space_utils.py merge tool and should be addressed.

  • Aliases are lost when a single file is used
  • Aliases are not interpreted in references (text value)

Code version and environment identification

ce63e546 (1.6.0*)

Steps to reproduce

  • Create an input XML file with a variable and a reference like:
      <Reference ReferenceType="HasTypeDefinition">BaseObjectType</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">ns=0;i=85</Reference>

Output:

Sanitize: inverse Reference from unknown node, cannot add forward reciprocal (ns=1;s=Test -> ns=0;i=85, type HasComponent)

(of course i=85 exists in output file)

Security impact

None identified

Possible fixes

  • ALIASES lost: Use a class memeber to store and update aliases. Initialize it on first file and update on further steps

  • ALIASES : Force interpretation in "sanitize" for both source and target NID

History

From !1063 (merged):

  • @v.monfort started a discussion: (+1 comment)

    It seems that the aliases are not managed: Sanitize: Reference to unknown node, cannot add inverse reciprocal (ns=2;i=10 -> Mandatory, type HasModellingRule) with a reference: <Reference ReferenceType="HasModellingRule">Mandatory</Reference> whereas the Alias exists: <Alias Alias="Mandatory">i=78</Alias>

    A new issue might be opened from this thread if we do not fix it in this MR.

Edited Mar 18, 2025 by Jérémie Chabod
Assignee Loading
Time tracking Loading