Just to consider a possible alternative for grouping elements like
PortGroup, LinkGroup (and maybe others). Just I'm thinking.
<port id="p1">
...
</port>
<port id="p2">
...
</port>
<port id="p3">
...
</port>
<collection:set id ="c1">
<port idRef="p1"/>
<port idRef="p2"/>
<port idRef="p3"/>
</collection:set>
<port idRef="c1"/> <- higher level port
<collection:set id ="c2">
<port idRef="p1"/>
<port idRef="p2"/>
<port idRef="p3"/>
</collection:set>
<node idRef="c2"/>)
Roman