bSI-InfraRoom / bSI-InfraRoom/IFC-Specification
Invalid IfcXML schema in case of redeclared derived attributes?
- Dominant language
- No language data
- Stars
- 27
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
In my interpretation the IfcXML XSD generated by IfcDoc is not compliant in the case of redeclared derived attributes. I'd like to get some additional eyes on this and discuss how to proceed. Also ping @TLiebich and @NickNisbet as the authors of the IFC4-xml spec.
According to 10303-28 **8.5.4.3 Inheritance structures with redeclarations only**
There shall not be an intermediate complexType. The full definition is provided as
```xml
(unchanged and redeclared accessor elements)
(redeclared accessor attributes)
```
Yet, for IfcMirroredProfileDef, with only redeclared (derived in subtype) content, an intermediate complexType is generated by IfcDoc (indeed, due to the lack of newly introduced attributes the extension is pointless).
~~~
ENTITY IfcMirroredProfileDef
SUBTYPE OF (IfcDerivedProfileDef);
DERIVE
SELF\IfcDerivedProfileDef.Operator : IfcCartesianTransformationOperator2D :=
IfcRepresentationItem() || IfcGeometricRepresentationItem() ||
IfcCartesianTransformationOperator(
-- Axis1
IfcRepresentationItem() || IfcGeometricRepresentationItem() ||
IfcDirection([-1., 0.]),
-- Axis2
IfcRepresentationItem() || IfcGeometricRepresentationItem() ||
IfcDirection([ 0., 1.]),
-- LocalOrigin
IfcRepresentationItem() || IfcGeometricRepresentationItem() ||
IfcPoint() || IfcCartesianPoint([0., 0.]),
-- Scale
1.) ||
IfcCartesianTransformationOperator2D();
END_ENTITY;
~~~
~~~xml
~~~
Also, note:
> (unchanged and redeclared elements): is the set of accessor element declarations
corresponding to all of the attributes of the supertype **(including all attributes the supertype inherits)**
that are mapped to accessor elements.
(emphasis mine)
Inherited supertype attributes in this case include the HasProperties inverse
~~~xml
~~~
Because of the config definition
~~~xml
~~~
The second part of inheritance also applies to e.g
~~~xml
~~~
Where the elements
~~~xml
~~~
are omitted by IfcDoc.
Note that these issues are observed in the IFC4 XSD because recent 4.3 versions seem not to include the XSD (e.g https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC4/XML/IFC4x3_RC4.xsd)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.