modelica / ssp-ls-traceability

Prototyping of an SSP Traceability Layered Standard
Other
11 stars 4 forks source link

XLink Locator and Arc conformity #55

Closed localhorst87 closed 1 year ago

localhorst87 commented 1 year ago

Current behavior:

Although stated in the STC schema definition in line 291ff that the Arc element "provides an arc conforming to the XLink specification" it's not conforming to the XLink specification, as xlink:from and xlink:to are defined as optional in the XLink Spec (--> If no value is supplied for a from or to attribute, the missing value is interpreted as standing for all locators).

Proposed solution:

Solution 1 (stick to XLink spec): Define xlink:from and xlink:to as optional

Solution 2 (don't stick to XLink spec): Define xlink:label in the Locator element as required, because according to XLink Spec 5.7: "If a value is supplied for a from or to attribute, it must correspond to the same value for some label attribute on a locator- [...] type element that appears as a direct child inside the same extended-type element as does the arc-type element."

pmai commented 1 year ago

Thank you for the Issue. I don't think that this is a conformance issue per se, as section 4.4 states:

Finally, while this specification identifies the minimum constraints on XLink markup, schemas that use XLink are free to tighten these constraints. The use of XLink does not absolve a valid document from conforming to the constraints expressed in its governing schema.

So the requirement on xlink:from and xlink:to to be present is just such a tightening of the constraints.

That being said, as you say, it would be more consistent to then also make xlink:label on locator elements mandatory. Or to remove the restriction on xlink:from and xlink:to.

I will prepare a PR to remove the restrictions for discussion in the MAP SSP SSPTraceability sub-group.