ifcXML4 Specification Methodology V1-1
ifcXML4 Specification Methodology V1-1
ifcXML4
Specification Methodology
Specification of the mapping methodology from
EXPRESS to XML schema definition for IFC4
developed by
Model Support Group (MSG) of buildingSMART International Ltd.
authors
Liebich, Thomas; Weise, Matthias
Version 1.1
22. July 2013
Model Support Group
Document history
1.1 First revised release based on IFC4 Final 2013-07-22
• Updated namespaces and locations
• New configuration option
• Improvements on examples
1.0 First public release based on IFC4 RC4 2012-10-04
• Manually added configuration setting for specific SELECT types changed
from type-tag to double-tag
0.9 First release for internal discussion and submission to the project sponsors 2012-07-09
Table of Content
1 Overview .................................................................................................................................................................................. 5
1.1 buildingSMART objectives ................................................................................................................. 5
1.2 Development strategy for ifcXML...................................................................................................... 5
1.3 buildingSMART development task .................................................................................................... 5
1.4 Software developer tasks .................................................................................................................. 5
2 Conversion rules for ifcXML4 for the entire IFC schema ..................................................................................... 6
2.1 Constructs not mapped into ifcXML schema..................................................................................... 6
2.2 Creation of ifcXML schema and root element................................................................................... 6
2.3 Mapping of HEADER information ...................................................................................................... 8
2.4 Mapping of EXPRESS entities ............................................................................................................. 9
2.5 Mapping of EXPRESS attributes ......................................................................................................... 9
2.5.1 Non-aggregated EXPRESS attributes ....................................................................................... 10
2.5.2 Aggregated EXPRESS attributes ............................................................................................... 13
2.5.3 Multi-dimensional aggregated EXPRESS attributes ................................................................. 17
2.6 Handling of INVERSE attributes ....................................................................................................... 22
3 Conversion rules for ifcXML4 for specific MVD's ................................................................................................. 25
Appendix – ifcXML4 configuration settings ..................................................................................................................... 26
Automatically added attribute definitions .................................................................................................. 26
Manually added attribute definitions for ifcXML4 (entire schema)............................................................ 26
“tagless” settings for non-nested aggregations ...................................................................................... 26
“tagless” settings for nested aggregations .............................................................................................. 27
"attribute-tag" for BINARY attributes of unknown bit-size ..................................................................... 28
Use of inverse instead of explicit attributes ............................................................................................ 28
Acknowledgment......................................................................................................................................................................... 29
Table of Tables
Table 1: ifcXML4 schema information ............................................................................................................... 7
Table 2: ifcXML4 header information ................................................................................................................ 8
Table 3: Example for “by-value” and “by-reference” instance elements ......................................................... 9
Table 4: Example of non-aggregated simple and enumerated attributes in ifcXML4..................................... 10
Table 5: Example of non-aggregated SELECT type attributes in ifcXML4........................................................ 12
Table 6: Example of non-aggregated entity-type attribute............................................................................. 13
Table 7: Example of aggregated simple data type .......................................................................................... 14
Table 8: Example of aggregated STRING data type that can contain space characters .................................. 15
Table 9: Example of aggregated STRING data type that shall not contain space characters.......................... 16
Table 10: Example of aggregated ENTITY data type........................................................................................ 17
Table 11: Example of nested aggregations translated into XML attributes as used for “rectangular” nested
aggregations of INTEGER, REAL, NUMBER, BOOLEAN, LOGICAL or ENUMERATION data type ...................... 19
Table 12: Example of nested aggregations that require a sequence of inline elements as for instance needed
for “non-rectangular” nested aggregations .................................................................................................... 20
Table 13: Example of nested aggregation of ENTITY type............................................................................... 22
Table 14: Example of inverse relationships ..................................................................................................... 24
1 Overview
With the new development of the IFC4 standard, the XML equivalent to the EXPRESS based
specification, called ifcXML, has undergone a complete redevelopment. The goal has been to simplify
the corresponding XML schema, the ifcXML XSD, and to obtain smaller and more compact XML data
files. The development has been executed under the codeword "simple ifcXML".
<cnf:uosElement name="ifcXML"/>
The name space of the ifcXML4 schema is governed by the configuration file, the actual name space
designator is provided by the buildingSMART Model Support Group when publishing an official ifcXML
release. The schema location of the XML Schema for validating ifcXML4 files is determined at the same
time and the XML Schema is uploaded to the official buildingSMART server.
Configuration for ifcXML4:
<cnf:schema targetNamespace="http://www.buildingsmart-tech.org/ifcXML/IFC4/final"
elementFormDefault="qualified" attributeFormDefault="unqualified">
embed-schema-items="true"
<cnf:namespace prefix="ifc"
alias="http://www.buildingsmart-tech.org/ifcXML/IFC4/final"/>
</cnf:schema>
The additional configuration option embed-schema-items="true" determines, that the resulting XML
Schema is a single file having a single target name space. It incorporates the ISO 10303-28 base
definitions into the target name space.
NOTE An URL for the final XSD schema location will be published by buildingSMART MSG after
finalizing the XSD schema definition.
NOTE The 'schemaLocation' enables to check an ifcXML file against the IFC XML schema definition.
Further information about the EXPRESS source schema and used configuration settings can be
added through the optional attributes 'express' and 'configuration'. Similar to 'schemaLocation' it
should either be a single URI, or a list of URIs of which the first is a URN and all of the others are
possible locations of the text.
The tagless attribute determines the handling of aggregated attributes only and is explained in 2.5.2.
ifcXML File
<IfcActorRole id="i1546" Role="architect" Description="general architect"/>
Table 4: Example of non-aggregated simple and enumerated attributes in ifcXML4
NOTE According to conversion rules of ISO10303-28 all enumeration items are in lower case.
NOTE The values of the id attributes in the ifcXML file do not have to match the instance numbers
(#) within the ifc file. An id attribute has to start with a non-numeric character, hence the
convention to have an "i" as prefix.
EXPRESS
ENTITY IfcTextStyleForDefinedFont
SUBTYPE OF (IfcPresentationItem);
Colour : IfcColour;
BackgroundColour : OPTIONAL IfcColour;
END_ENTITY;
TYPE IfcColour = SELECT
(IfcColourSpecification
,IfcPreDefinedColour);
END_TYPE;
XSD
<xs:element name="IfcTextStyleForDefinedFont"
type="ifc:IfcTextStyleForDefinedFont"
substitutionGroup="ifc:IfcPresentationItem" nillable="true"/>
<xs:complexType name="IfcTextStyleForDefinedFont">
<xs:complexContent>
<xs:extension base="ifc:IfcPresentationItem">
<xs:sequence>
<xs:element name="Colour">
<xs:complexType>
<xs:group ref="ifc:IfcColour"/>
</xs:complexType>
</xs:element>
<xs:element name="BackgroundColour" nillable="true" minOccurs="0">
<xs:complexType>
<xs:group ref="ifc:IfcColour"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
IFC File
#314= IFCTEXTSTYLEFORDEFINEDFONT(#315, $);
#315= IFCCOLOURRGB('NOTE colour',1.,0.,0.);
ifcXML File
<IfcTextStyleForDefinedFont id="i34">
<Colour>
<IfcColourRgb id="i35" Name="NOTE colour" Red="1." Green="0." Blue="0."/>
</Colour>
</IfcTextStyleForDefinedFont>
Table 5: Example of non-aggregated SELECT type attributes in ifcXML4
XSD
<xs:element name="IfcCartesianPoint" type="ifc:IfcCartesianPoint"
substitutionGroup="ifc:IfcPoint" nillable="true"/>
<xs:complexType name="IfcCartesianPoint">
<xs:complexContent>
<xs:extension base="ifc:IfcPoint">
<xs:attribute name="Coordinates" use="optional">
<xs:simpleType>
<xs:restriction>
<xs:simpleType>
<xs:list itemType="ifc:IfcLengthMeasure"/>
</xs:simpleType>
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="IfcLengthMeasure">
<xs:restriction base="xs:double"/>
</xs:simpleType>
IFC File
#42= IFCCARTESIANPOINT((0.,0.,0.));
ifcXML File
<IfcCartesianPoint id="i1942" Coordinates="0. 0. 0."/>
Table 7: Example of aggregated simple data type
All EXPRESS attributes of a given ENTITY that are aggregates and have a fundamental data type being
a simple type of STRING or BINARY are treated by default as a sequence of inline XML elements having
the name of the EXPRESS defined type, or the generated name for an EXPRESS simple data type.
NOTE These names get the suffix "-wrapper". The outline element grouping the aggregate has the
name of the EXPRESS attribute.
Configuration for ifcXML4:
Stated for all such EXPRESS attributes within the global <option> scope.
<cnf:option concrete-attribute="attribute-content" tagless="unspecified"/>
XSD
<xs:element name="IfcPostalAddress" type="ifc:IfcPostalAddress"
substitutionGroup="ifc:IfcAddress" nillable="true"/>
<xs:complexType name="IfcPostalAddress">
<xs:complexContent>
<xs:extension base="ifc:IfcAddress">
<xs:sequence>
<xs:element name="AddressLines" nillable="true" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="ifc:IfcLabel-wrapper" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="ifc:itemType" fixed="ifc:IfcLabel-wrapper"/>
<xs:attribute ref="ifc:cType" fixed="list"/>
<xs:attribute ref="ifc:arraySize" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
..
</xs:extension>
</xs:complexContent>
</xs:complexType>
IFC File
#74= IFCPOSTALADDRESS(.OFFICE.,'AEC3 Germany',$,$,
('AEC3 Deutschland GmbH', 'Wendl-Dietrich-Str. 16'),
$,'Muenchen',$,'80634','Germany');
ifcXML File
<IfcPostalAddress id="i74" Purpose="office" Description="AEC3 Germany"
Town="Muenchen" PostalCode="80634" Country="Germany">
<AddressLines>
<IfcLabel-wrapper>AEC3 Deutschland GmbH</IfcLabel-wrapper>
<IfcLabel-wrapper>Wendl-Dietrich-Str. 16</IfcLabel-wrapper>
</AddressLines>
</IfcPostalAddress>
Table 8: Example of aggregated STRING data type that can contain space characters
<cnf:entity select="IfcTelecomAddress">
<cnf:attribute select="TelephoneNumbers" tagless="true" />
</cnf:entity>
ifcXML File
<IfcRelAggregates GlobalId="2YBqaV_8L15eWJ9DA1sGmT">
<RelatingObject xsi:nil="true" ref="i1895" xsi:type="IfcProject"/>
<RelatedObjects>
<IfcBuilding xsi:nil="true" ref="i1928"/>
</RelatedObjects>
</IfcRelAggregates>
Table 10: Example of aggregated ENTITY data type
attribute of the XML element corresponding to the given ENTITY. The value of that XML element is a
space delimited list of such simple values or enumerators.
NOTE “Rectangular” means that all nested aggregates are of fixed size with min=max. This is not
required for the first aggregate, which can be of an unknown size like [min=0: max=?].
Configuration for “rectangular” nested aggregations:
Stated for all such EXPRESS attributes individually. One configuration setting is required for each
attribute. It overrides the general setting of tagless and concrete-attribute in <option> scope. This
<attribute> configuration setting has to be done manually.
Manual configuration option for ifcXML4:
<cnf:entity select="name of entity">
<cnf:attribute select="name of attribute" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
Example:
<cnf:entity select="IfcCartesianPointList3D">
<cnf:attribute select="CoordList" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
NOTE flatten="true" is the default setting and therefore also applies if flatten is not stated within
the <attribute> scope.
ifcXML File
<IfcCartesianPointList3D id="i1976" CoordList="-500. -500. 0. 500. -500. 0. 500.
500. 0. -500. 500. 0. -500. -500. 2000. 500. -500. 2000. 500. 500. 2000. -500.
500. 2000."/>
Table 11: Example of nested aggregations translated into XML attributes as used for “rectangular” nested
aggregations of INTEGER, REAL, NUMBER, BOOLEAN, LOGICAL or ENUMERATION data type
The names of inline elements are the EXPRESS entity names of the instantiations. It is important to
insert the pos attribute denoting the position of the element within the original multi-dimensioning
structure.
Configuration:
Stated for all such EXPRESS attributes individually. One configuration setting is required for each
attribute. It overrides the general setting of tagless and concrete-attribute in <option> scope. This
<attribute> configuration setting shall be done manually.
Manual configuration option for ifcXML4:
<cnf:entity select="name of entity">
<cnf:attribute select="name of attribute" tagless="false"/>
</cnf:entity>
Example:
<cnf:entity select="IfcBSplineSurface">
<cnf:attribute select="ControlPointsList" tagless="false"/>
</cnf:entity>
NOTE flatten="true" is the default setting and therefore also applies if flatten is not stated within
the <attribute> scope.
EXPRESS (definition of nested aggregation of ENTITY, without constraints and other attribute
definitions)
ENTITY IfcBSplineSurface
ABSTRACT SUPERTYPE OF (ONEOF
(IfcBSplineSurfaceWithKnots))
SUBTYPE OF (IfcBoundedSurface);
..
ControlPointsList : LIST [2:?] OF LIST [2:?] OF IfcCartesianPoint;
..
END_ENTITY;
XSD
<xs:element name="IfcBSplineSurface" type="ifc:IfcBSplineSurface" abstract="true"
substitutionGroup="ifc:IfcBoundedSurface" nillable="true"/>
<xs:complexType name="IfcBSplineSurface" abstract="true">
<xs:complexContent>
<xs:extension base="ifc:IfcBoundedSurface">
<xs:sequence>
<xs:element name="ControlPointsList">
<xs:complexType>
<xs:sequence>
<xs:element ref="ifc:IfcCartesianPoint"
minOccurs="4" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="ifc:itemType" fixed="ifc:IfcCartesianPoint"/>
<xs:attribute ref="ifc:cType" fixed="list list"/>
<xs:attribute ref="ifc:arraySize" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
..
</xs:extension>
</xs:complexContent>
</xs:complexType>
EXPRESS (definition for using inverse instead of explicit attributes, without constraints and other
attribute definitions)
ENTITY IfcGeometricRepresentationContext
SUBTYPE OF (IfcRepresentationContext);
..
INVERSE
HasSubContexts : SET [0:?] OF IfcGeometricRepresentationSubContext
FOR ParentContext;
END_ENTITY;
ENTITY IfcGeometricRepresentationSubContext
SUBTYPE OF (IfcGeometricRepresentationContext);
ParentContext : IfcGeometricRepresentationContext;
..
END_ENTITY;
XSD
<xs:element name="IfcGeometricRepresentationContext"
type="ifc:IfcGeometricRepresentationContext"
substitutionGroup="ifc:IfcRepresentationContext" nillable="true"/>
<xs:complexType name="IfcGeometricRepresentationContext">
<xs:complexContent>
<xs:extension base="ifc:IfcRepresentationContext">
<xs:sequence>
..
<xs:element name="HasSubContexts" nillable="true" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="ifc:IfcGeometricRepresentationSubContext"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="ifc:itemType"
fixed="ifc:IfcGeometricRepresentationSubContext"/>
<xs:attribute ref="ifc:cType" fixed="set"/>
<xs:attribute ref="ifc:arraySize" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
..
</xs:extension>
</xs:complexContent>
</xs:complexType>
IFC File
#53= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.0000000E-5,#46,#$);
#46= IFCAXIS2PLACEMENT3D(#42,$,$);
#61= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#53,
$,.MODEL_VIEW.,$);
ifcXML File
<IfcGeometricRepresentationContext id="i1914" ContextType="Model"
CoordinateSpaceDimension="3" Precision="1.000000000E-5">
<IfcAxis2Placement3D id="i1918">
<Location xsi:nil="true" ref="i1942" xsi:type="IfcCartesianPoint"/>
</IfcAxis2Placement3D>
<HasSubContexts>
<IfcGeometricRepresentationSubContext id="i1917" ContextIdentifier="Body"
ContextType="Model" TargetView="model_view"/>
</HasSubContexts>
</IfcGeometricRepresentationContext>
Table 14: Example of inverse relationships
NOTE The re-declared as derived attributes are masked as * in the ifc file, those attributes are
removed in the ifcXML schema by using the complexContent by restriction. Therefore they do not
appear in the ifcXML file for IfcGeometricRepresentationSubContext.
Further details about these configuration settings will be provided for each MVD.
The following STRING aggregations can contain space characters and therefore must use the setting
tagless=”false”. Although similar to the global configuration setting it was decided to add an individual
configuration:
<cnf:entity select="IfcClassification">
<cnf:attribute select="ReferenceTokens" tagless="false"
exp-attribute="double-tag"/>
</cnf:entity>
<cnf:entity select="IfcPostalAddress">
<cnf:attribute select="AddressLines" tagless="false"
exp-attribute="double-tag"/>
</cnf:entity>
Page no. Author
26 Thomas Liebich, Matthias Weise - Model Support Group of buildingSMART International
Model Support Group
<cnf:entity select="IfcTextStyleFontModel">
<cnf:attribute select="FontFamily" tagless="false"
exp-attribute="double-tag"/>
</cnf:entity>
BINARY:
The default setting of BINARY aggregations (i.e. list of BINARY values being octet-strings (multiples of
8 bits) is changed to tagless = “true” for the following elements:
<cnf:entity select="IfcPixelTexture">
<cnf:attribute select="Pixel" tagless="true" exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcCartesianPointList3D">
<cnf:attribute select="CoordList" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcColourRgbList">
<cnf:attribute select="ColourList" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcIndexedTriangleTextureMap">
<cnf:attribute select="TexCoordIndex" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcTextureVertexList">
<cnf:attribute select="TexCoordsList" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcTriangulatedFaceSet">
<cnf:attribute select="CoordIndex" tagless="true"
exp-attribute="attribute-content"/>
<cnf:attribute select="NormalIndex" tagless="true"
exp-attribute="attribute-content"/>
</cnf:entity>
<cnf:entity select="IfcBSplineSurface">
<cnf:attribute select="ControlPointsList" tagless="false"/>
</cnf:entity>
<cnf:entity select="IfcRationalBSplineSurfaceWithKnots">
<cnf:attribute select="WeightsData" tagless="false"/>
</cnf:entity>
<cnf:entity select="IfcStructuralLoadConfiguration">
<cnf:attribute select="Locations" tagless="false"/>
</cnf:entity>
<cnf:entity select="IfcBlobTexture">
<cnf:attribute select="RasterCode" exp-attribute="attribute-tag"/>
</cnf:entity>
<cnf:entity select="IfcGeometricRepresentationContext">
<cnf:attribute select="WorldCoordinateSystem" exp-attribute="double-tag"/>
<cnf:attribute select="TrueNorth" exp-attribute="attribute-tag"/>
<cnf:inverse select="HasSubContexts" exp-attribute="double-tag"/>
</cnf:entity>
<cnf:entity select="IfcGeometricRepresentationSubContext">
<cnf:attribute select="ParentContext" keep="false"/>
</cnf:entity>
<cnf:entity select="IfcTessellatedFaceSet">
<cnf:attribute select="Coordinates" exp-attribute="attribute-tag"/>
<cnf:attribute select="Normals" exp-attribute="attribute-tag"/>
<cnf:inverse select="HasColours" exp-attribute="attribute-tag"/>
<cnf:inverse select="HasTextures" exp-attribute="double-tag"/>
</cnf:entity>
<cnf:entity select="IfcIndexedColourMap">
<cnf:attribute select="MappedTo" keep="false"/>
<cnf:attribute select="Overrides" exp-attribute="attribute-tag"/>
<cnf:attribute select="Colours" exp-attribute="attribute-tag"/>
</cnf:entity>
<cnf:entity select="IfcIndexedTextureMap">
<cnf:attribute select="MappedTo" keep="false"/>
<cnf:attribute select="TexCoords" exp-attribute="attribute-tag"/>
</cnf:entity>
<cnf:entity select="IfcMaterial">
<cnf:inverse select="HasRepresentation" exp-attribute="attribute-tag"/>
</cnf:entity>
<cnf:entity select="IfcMaterialDefinitionRepresentation">
<cnf:attribute select="RepresentedMaterial" keep="false"/>
</cnf:entity>
<cnf:entity select="IfcMaterialDefinition">
<cnf:inverse select="HasProperties" exp-attribute="double-tag"/>
</cnf:entity>
<cnf:entity select="IfcMaterialProperties">
<cnf:attribute select="Material" keep="false"/>
</cnf:entity>
<cnf:entity select="IfcProfileDef">
<cnf:inverse select="HasProperties" exp-attribute="double-tag"/>
</cnf:entity>
<cnf:entity select="IfcProfileProperties">
<cnf:attribute select="ProfileDefinition" keep="false"/>
</cnf:entity>
<cnf:entity select="IfcProductDefinitionShape">
Acknowledgment
This work would not have been able without the Norwegian Building Authority (DiBK) funding work
for buildingSMART International and the research project Mefisto (http://www.mefisto-
bau.de/objective/lang/en), partially funded by the German Ministry of Education and Research,
funding work for AEC3 Deutschland GmbH. We would like to thank both parties for supporting this
work.