intermediate release: added support for IfcComplexProperty and further code optimizations

parent a72a4a34
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) GenerateTargetElement.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="GenerateTargetElement"> <xsl:param name="KeyPool"/> <xsl:param name="simelemname"/> <xsl:param name="unsortedtargetcontent"/> <xsl:if test="current()[@GlobalId]"> <xsl:for-each select="."> <xsl:element name="{$simelemname}"> <xsl:attribute name="RefId"><xsl:call-template name="TargetValueFormatConditions"><xsl:with-param name="sourcename"><xsl:value-of select="'GlobalId'"/></xsl:with-param><xsl:with-param name="sourcevalue"><xsl:value-of select="@GlobalId"/></xsl:with-param></xsl:call-template></xsl:attribute> <xsl:call-template name="IterateAlongSequenceOrder"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="CurrentSimElementName" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent" select="$unsortedtargetcontent"/> </xsl:call-template> </xsl:element> </xsl:for-each> </xsl:if> </xsl:template> <xsl:template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:param name="KeyPool"/> <xsl:param name="preEvaluation"/> <xsl:if test="current()[@GlobalId]"> <xsl:for-each select="."> <xsl:variable name="PropertySetsByType"> <xsl:call-template name="IfcType"> </xsl:call-template> </xsl:variable> <xsl:variable name="PropertySetsByRelDefBy"> <xsl:call-template name="ResolveIfcRelDefinesByProperties"> </xsl:call-template> <xsl:if test="current()/IsDefinedBy"> <xsl:for-each select="current()/IsDefinedBy/IfcRelDefinesByProperties/RelatingPropertyDefinition"> <xsl:copy-of select="current()"/> </xsl:for-each> </xsl:if> </xsl:variable> <xsl:variable name="ConcatedPsetCollections"> <xsl:call-template name="DuplicateFilterSourceObjectPropertyCollectionMerge"> <xsl:with-param name="firstCollection" select="$PropertySetsByRelDefBy"/> <xsl:with-param name="secondCollection" select="$PropertySetsByType"/> </xsl:call-template> </xsl:variable> <xsl:for-each select="msxsl:node-set($ConcatedPsetCollections)/*"> <xsl:call-template name="IfcPropertySet"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="preEvaluation" select="$preEvaluation"/> </xsl:call-template> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:template> <xsl:template name="MergeTargetElementContentCollections"> <xsl:param name="generictargetcontent"/> <xsl:param name="resolvedfromproperties"/> <xsl:for-each select="msxsl:node-set($generictargetcontent)/node()"> <xsl:variable name="psetitem" select="local-name()"/> <xsl:variable name="check_pset_pregem"> <xsl:for-each select="msxsl:node-set($resolvedfromproperties)/node()"> <xsl:if test="local-name() = $psetitem"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:choose> <xsl:when test="$check_pset_pregem != ''"> <xsl:copy-of select="$check_pset_pregem"/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="current()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) GenerateTargetElement.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="GenerateTargetElement"> <xsl:param name="KeyPool"/> <xsl:param name="simelemname"/> <xsl:param name="unsortedtargetcontent"/> <xsl:if test="current()[@GlobalId]"> <xsl:for-each select="."> <xsl:element name="{$simelemname}"> <xsl:attribute name="RefId"><xsl:call-template name="TargetValueFormatConditions"><xsl:with-param name="sourcename"><xsl:value-of select="'GlobalId'"/></xsl:with-param><xsl:with-param name="sourcevalue"><xsl:value-of select="@GlobalId"/></xsl:with-param></xsl:call-template></xsl:attribute> <xsl:call-template name="IterateAlongSequenceOrder"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="CurrentSimElementName" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent" select="$unsortedtargetcontent"/> </xsl:call-template> </xsl:element> </xsl:for-each> </xsl:if> </xsl:template> <xsl:template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:param name="KeyPool"/> <xsl:param name="preEvaluation"/> <xsl:if test="current()[@GlobalId]"> <xsl:for-each select="."> <xsl:variable name="PropertySetsByType"> <xsl:call-template name="IfcType"> </xsl:call-template> </xsl:variable> <xsl:variable name="PropertySetsByRelDefBy"> <xsl:call-template name="ResolveIfcRelDefinesByProperties"> </xsl:call-template> <xsl:if test="current()/IsDefinedBy"> <xsl:for-each select="current()/IsDefinedBy/IfcRelDefinesByProperties/RelatingPropertyDefinition"> <xsl:copy-of select="current()"/> </xsl:for-each> </xsl:if> </xsl:variable> <xsl:variable name="ConcatedPsetCollections"> <xsl:call-template name="DuplicateFilterSourceObjectPropertyCollectionMerge"> <xsl:with-param name="firstCollection" select="$PropertySetsByRelDefBy"/> <xsl:with-param name="secondCollection" select="$PropertySetsByType"/> </xsl:call-template> </xsl:variable> <xsl:for-each select="msxsl:node-set($ConcatedPsetCollections)/*"> <xsl:call-template name="IfcPropertySet"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="preEvaluation" select="$preEvaluation"/> </xsl:call-template> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:template> <xsl:template name="MergeTargetElementContentCollections"> <xsl:param name="generictargetcontent"/> <xsl:param name="resolvedfromproperties"/> <xsl:for-each select="msxsl:node-set($generictargetcontent)/node()"> <xsl:variable name="psetitem" select="local-name()"/> <xsl:variable name="check_pset_pregem"> <xsl:for-each select="msxsl:node-set($resolvedfromproperties)/node()"> <xsl:if test="local-name() = $psetitem"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:choose> <xsl:when test="$check_pset_pregem != ''"> <xsl:copy-of select="$check_pset_pregem"/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="current()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcActor.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcActor"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcActor.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcActor"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcController.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="IfcController" match="ifc:IfcController" mode="experimental"> <SimController_SupplyWater_Temperature RefId="ID877"> <simcore:SimUniqueID>ef8214c0-7b34-45cf-a4f5-b4a0473ccf13</simcore:SimUniqueID> <simcore:SimModelType>SupplyWater</simcore:SimModelType> <simcore:SimModelSubtype>Temperature</simcore:SimModelSubtype> <simcore:SimModelName>WTS-1</simcore:SimModelName> <simcore:SourceModelSchema>Simergy v1.9.0.20090</simcore:SourceModelSchema> <simcore:SourceModelObjectType>SIM:SimController</simcore:SourceModelObjectType> <simcore:IsTemplateObject>false</simcore:IsTemplateObject> <simcore:AssignedToGroups>ID851</simcore:AssignedToGroups> <simcore:Tag>WTS-1</simcore:Tag> <simcore:SelectedPropertyGroups> <simcore:stringItem>Controller:WaterTemperature</simcore:stringItem> </simcore:SelectedPropertyGroups> <simmep:SimCntrl_ControllerScheme_1>ID833</simmep:SimCntrl_ControllerScheme_1> </SimController_SupplyWater_Temperature> </xsl:template> <xsl:template name="filterAllElementContents"> <xsl:param name="input"/> <xsl:for-each select="msxsl:node-set($input)/node()"> <xsl:if test="not(starts-with(local-name(), 'eeBIMc_FLAG_'))"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template name="filterAllControllerContents"> <xsl:param name="input"/> <xsl:variable name="filter"> <xsl:for-each select="msxsl:node-set($input)/node()"> <xsl:if test="starts-with(local-name(), 'eeBIMc_FLAG_')"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:choose> <xsl:when test="msxsl:node-set($filter)/node()"> <xsl:copy-of select="$filter"/> </xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FillControllerSceleton"> <xsl:param name="taggedTargetContent"/> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcController.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="IfcController" match="ifc:IfcController" mode="experimental"> <SimController_SupplyWater_Temperature RefId="ID877"> <simcore:SimUniqueID>ef8214c0-7b34-45cf-a4f5-b4a0473ccf13</simcore:SimUniqueID> <simcore:SimModelType>SupplyWater</simcore:SimModelType> <simcore:SimModelSubtype>Temperature</simcore:SimModelSubtype> <simcore:SimModelName>WTS-1</simcore:SimModelName> <simcore:SourceModelSchema>Simergy v1.9.0.20090</simcore:SourceModelSchema> <simcore:SourceModelObjectType>SIM:SimController</simcore:SourceModelObjectType> <simcore:IsTemplateObject>false</simcore:IsTemplateObject> <simcore:AssignedToGroups>ID851</simcore:AssignedToGroups> <simcore:Tag>WTS-1</simcore:Tag> <simcore:SelectedPropertyGroups> <simcore:stringItem>Controller:WaterTemperature</simcore:stringItem> </simcore:SelectedPropertyGroups> <simmep:SimCntrl_ControllerScheme_1>ID833</simmep:SimCntrl_ControllerScheme_1> </SimController_SupplyWater_Temperature> </xsl:template> <xsl:template name="filterAllElementContents"> <xsl:param name="input"/> <xsl:for-each select="msxsl:node-set($input)/node()"> <xsl:if test="not(starts-with(local-name(), 'eeBIMc_FLAG_'))"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template name="filterAllControllerContents"> <xsl:param name="input"/> <xsl:variable name="filter"> <xsl:for-each select="msxsl:node-set($input)/node()"> <xsl:if test="starts-with(local-name(), 'eeBIMc_FLAG_')"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:choose> <xsl:when test="msxsl:node-set($filter)/node()"> <xsl:copy-of select="$filter"/> </xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FillControllerSceleton"> <xsl:param name="taggedTargetContent"/> <xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()"> <xsl:choose> <xsl:when test="contains(name(), 'SimDummy')"> <xsl:variable name="designatedElementTargetName"> <xsl:value-of select="text()"/> </xsl:variable> <xsl:element name="{normalize-space($designatedElementTargetName)}"> <xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()"> <xsl:if test="not(contains(name(), 'SimDummy'))"> <xsl:element name="{normalize-space(substring-after(local-name(), 'eeBIMc_FLAG_'))}"> <xsl:value-of select="text()"/> </xsl:element> </xsl:if> </xsl:for-each> </xsl:element> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcOccupant.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcOccupant"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcOccupant.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcOccupant"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcSystem.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="IfcSystem" match="ifc:IfcSystem | ifc:RelatingGroup[@xsi:type = 'IfcSystem']"> <xsl:param name="KeyPool"/> <xsl:choose> <xsl:when test="local-name() = 'IfcSystem'"> <xsl:if test="$KeyPool != ''"> <xsl:variable name="splitter" select="concat(concat(local-name(), ' '),'Sim')"/> <xsl:variable name="headtuple"> <xsl:value-of select="concat($splitter, substring-after($KeyPool, $splitter))"/> </xsl:variable> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$headtuple"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:for-each select="./node()"> <xsl:if test="name() = RelatingGroup"> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$KeyPool != '' and @GlobalId !=''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:variable name="typename" select="current()/@xsi:type"/> <xsl:element name="{normalize-space($typename)}"> <xsl:copy-of select="current()/@*"/> <xsl:copy-of select="current()/*"/> </xsl:element> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:for-each select="./node()"> <xsl:if test="name() = RelatingGroup"> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcTank.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcTank"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcTank.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcTank"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
......@@ -58,7 +58,7 @@
<xsl:param name="taggedTargetContent"/>
<!--TESTWISE produce intended controller element-->
<!--<xsl:if test="$filteredelementscontrollercontents != 'FALSE'">-->
<!--DEBUG-->
<!--<xsl:element name="SimActor_Actor_Default">
IFC side TRIGGER from Psim_SimController bound to ((<xsl:value-of select="concat(current()/@name, current()/@GlobalId)"/>)):
-->
......@@ -88,7 +88,7 @@
</xsl:choose>
</xsl:for-each>
<!--</xsl:element>-->
<!--DEBUG-->
<!--<SimController>
Hello controller!
</SimController>-->
......
......@@ -73,19 +73,18 @@
<!--<xsl:copy-of select="$allsourceobjects"/>
</xsl:element>-->
<!--DEBUG-->
<xsl:for-each select="msxsl:node-set($allsourceobjects)/node()">
<xsl:variable name="currentElem" select="current()"/>
<xsl:variable name="currentElem" select="current()"/>
<xsl:choose>
<xsl:when test="current()/ifc:IsNestedBy/ifc:IfcRelNests/ifc:RelatedObjects/ifc:IfcDistributionPort">
<xsl:if test="current()/ifc:IsNestedBy/ifc:IfcRelNests/ifc:RelatedObjects/ifc:IfcDistributionPort[@GlobalId]">
<!--<xsl:apply-templates select="current()/IsNestedBy/IfcRelNests/RelatedObjects/ifc:IfcDistributionPort"/>-->
<xsl:for-each select="current()/ifc:IsNestedBy/ifc:IfcRelNests/ifc:RelatedObjects/ifc:IfcDistributionPort">
<xsl:if test="current()[@GlobalId]">
<xsl:call-template name="KeyPoolHelper">
<xsl:with-param name="currentElement" select="name()"/>
<xsl:with-param name="parentElement" select="$currentElem"/>
</xsl:call-template>
<xsl:if test="current()[@GlobalId]">
<xsl:call-template name="KeyPoolHelper">
<xsl:with-param name="currentElement" select="name()"/>
<xsl:with-param name="parentElement" select="$currentElem"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:call-template name="KeyPoolHelper">
......
......@@ -48,11 +48,7 @@
<xsl:if test="$relatingPort != ''">
<simres:SourcePort>
<xsl:for-each select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort">
<!--//*/node()-->
<!--DEBUG-->
<!--<xsl:copy-of select="current()"/>-->
<xsl:if test="current()[@id = $relatingPort]">
<!--ID<xsl:value-of select="current()/@GlobalId"/>-->
<xsl:call-template name="TargetValueFormatConditions">
<xsl:with-param name="sourcename">
<xsl:value-of select="'GlobalId'"/>
......@@ -71,9 +67,7 @@
<xsl:if test="$relatedPort != ''">
<simres:TargetPort>
<xsl:for-each select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort">
<!--//*/node()-->
<xsl:if test="current()[@id = $relatedPort]">
<!--ID<xsl:value-of select="current()/@GlobalId"/>-->
<xsl:call-template name="TargetValueFormatConditions">
<xsl:with-param name="sourcename">
<xsl:value-of select="'GlobalId'"/>
......
@echo off
cscript Main.js //Nologo %1
/* KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM)
* main.js
*
* JScript zur Transformation einer IFC Quelldatei in das designierte Zielformat durch den Einsatz von xsl stylesheet
*/
var args = WScript.Arguments;
if (args.length == 0) {
WScript.Echo("Syntaxfehler.");
WScript.Quit();
}
// command-line argumente auslesen
filename = args(0); // Quelldatei
try {
// XML Objekt fr die Quelldatei erzeugen
var xml = new ActiveXObject("Msxml2.DOMDocument.6.0");
xml.async = false;
xml.validateOnParse = true;
xml.load(filename);
WScript.Echo("source XML load succeeded.");
// Einlesevorgang Quelldatei error handling
if (xml.parseError.errorCode != 0) {
WScript.Echo(xml.parseError.reason);
WScript.Quit()
}
// XSLT-Stylesheet laden
var xsl = new ActiveXObject("Msxml2.DOMDocument.6.0");
xsl.async = false;
xsl.resolveExternals = true; // xsl:include zulassen
xsl.setProperty("AllowXsltScript", true); // Skripte erlauben
////////////////
xsl.setProperty("AllowDocumentFunction", true); // document() Funktion erlauben
///////////////
xsl.validateOnParse = true;
xsl.load("xsl\\Main.xsl"); // "Statisch verdrahteter" Einstiegspunkt in XSLT Geflecht
WScript.Echo("XSL load succeeded.");
// Einlesevorgang XSLT error handling
if (xsl.parseError.errorCode != 0) {
WScript.Echo(xsl.parseError.reason);
WScript.Quit()
}
// Objekt fr Zieldokument erzeugen
var result = new ActiveXObject("Msxml2.DOMDocument.6.0");
// Speichere Startzeit
var sTime = new Date();
// Quelldatei TRANSFORMieren
WScript.Echo("Started Transformation.");
xml.transformNodeToObject(xsl.documentElement, result);
WScript.Echo("Transformation succeeded.");
var eTime = new Date();
var elapsed = (eTime.getTime() - sTime.getTime()) / 1000;
WScript.Echo("Transformation took " + elapsed + " seconds.");
// Zieldokument in UTF-8-Stream schreiben
var utf8Stream = new ActiveXObject("ADODB.Stream");
fso = new ActiveXObject("Scripting.FileSystemObject");
utf8Stream.Type = 2; // adTypeText
utf8Stream.Charset = "utf-8"
utf8Stream.LineSeparator = 10; // adLF
utf8Stream.Open();
utf8Stream.WriteText(result.xml);
utf8Stream.Position = 3; // Byte Order Mark berspringen
utf8Stream.SaveToFile("output\\" + fso.GetBaseName(filename) + ".simxml", 2); // adSaveCreateOverWrite
WScript.Echo("Transformation result saved to OUTPUT folder.");
utf8Stream.Close();
}
catch (err) {
WScript.Echo(err.description);
}
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM)-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<!--EneffBIM common templates-->
<xsl:include href="../../KeyPoolBuilder/xsl/KeyPoolBuilder.xsl"/>
<xsl:include href="../../KeyPoolHelper/xsl/KeyPoolHelper.xsl"/>
<xsl:include href="../../KeyBoundElementGenerator/xsl/KeyBoundElementGenerator.xsl"/>
<xsl:include href="../../SimXsdRrepository/xsl/SimXsdRrepository.xsl"/>
<xsl:include href="../../GenerateTargetElement/xsl/GenerateTargetElement.xsl"/>
<!--IFC common templates-->
<xsl:include href="../../IfcPropertySet/xsl/IfcPropertySet.xsl"/>
<xsl:include href="../../IfcType/xsl/IfcType.xsl"/>
<xsl:include href="../../IfcHelper/xsl/IfcHelper.xsl"/>
<xsl:include href="../../ifcXML/xsl/ifcXML.xsl"/>
<!--nested IFC Object traversal templates-->
<xsl:include href="../../IfcProject/xsl/IfcProject.xsl"/>
<xsl:include href="../../IfcSite/xsl/IfcSite.xsl"/>
<xsl:include href="../../IfcBuilding/xsl/IfcBuilding.xsl"/>
<xsl:include href="../../IfcBuildingStorey/xsl/IfcBuildingStorey.xsl"/>
<xsl:include href="../../IfcSpace/xsl/IfcSpace.xsl"/>
<!--IFC object transformation templates-->
<xsl:include href="../../IfcSystem/xsl/IfcSystem.xsl"/>
<!--<xsl:include href="../../IfcBuildingSystem/xsl/IfcBuildingSystem.xsl"/>-->
<!--<xsl:include href="../../IfcDistributionSystem/xsl/IfcDistributionSystem.xsl"/>-->
<!--<xsl:include href="../../IfcDistributionPort/xsl/IfcDistributionPort.xsl"/>
<xsl:include href="../../IfcRelConnectsPorts/xsl/IfcRelConnectsPorts.xsl"/>
<xsl:include href="../../IfcSpaceHeater/xsl/IfcSpaceHeater.xsl"/>
<xsl:include href="../../IfcOccupant/xsl/IfcOccupant.xsl"/>
<xsl:include href="../../IfcActor/xsl/IfcActor.xsl"/>
<xsl:include href="../../IfcBoiler/xsl/IfcBoiler.xsl"/>
<xsl:include href="../../IfcTank/xsl/IfcTank.xsl"/>
<xsl:include href="../../IfcValve/xsl/IfcValve.xsl"/>
<xsl:include href="../../IfcPump/xsl/IfcPump.xsl"/>
<xsl:include href="../../IfcPipeSegment/xsl/IfcPipeSegment.xsl"/>
<xsl:include href="../../IfcPipeFitting/xsl/IfcPipeFitting.xsl"/>-->
<xsl:template match="/">
<!--<xsl:apply-templates/>-->
<xsl:if test="ifc:ifcXML">
<xsl:call-template name="ifcXML"/>
</xsl:if>
</xsl:template>
<!--prevent text() output if no template matching the type is present in xslt constellation-->
<xsl:template match="text()"/>
</xsl:stylesheet>
......@@ -52,7 +52,7 @@
<xsl:copy-of select="$KeyPoolSnippet"/>
</xsl:element>
</xsl:if>-->
<xsl:variable name="parentelem" select="msxsl:node-set($parentElement)[@GlobalId]"/>
<xsl:variable name="parentelem" select="msxsl:node-set($parentElement)/node()"/>
<!--</debug>-->
<xsl:if test="contains($KeyPoolSnippet, ' ')">
<!--not(contains($KeyPoolSnippet, ',')) and -->
......@@ -60,6 +60,14 @@
<xsl:variable name="simkey" select="substring-after($KeyPoolSnippet, ' ')"/>
<xsl:choose>
<xsl:when test="starts-with($simkey, 'Sim')">
<xsl:variable name="subComplexProp">
<xsl:choose>
<!--when iterating a complex property name we need to traverse the inner single properties - Mapping table example: IfcBoiler. Pset_BoilerTypeCommon . PartialLoadEfficiencyCurves . MinimumOutput-->
<xsl:when test="contains( substring-after( substring-after( substring-before($KeyPoolSnippet, ' '), concat($elemname, '.')) ,'.') , '.')">
<xsl:value-of select="substring-after( substring-after( substring-after( substring-before($KeyPoolSnippet, ' '), concat($elemname, '.')) ,'.') , '.')"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<!-- or $parentelem != '' or starts-with($simkey, 'sim')-->
<!--workarround q'n'd-->
<!--<xsl:if test="$parentElement != ''">
......@@ -383,6 +391,7 @@
<xsl:value-of select="$simpropfullname"/>
</xsl:with-param>
</xsl:call-template>
<xsl:value-of select="' '"/>
</xsl:if>
</xsl:for-each>
</xsl:if>
......@@ -528,10 +537,16 @@
<!--*| levelfourkey: <xsl:value-of select="$levelfourkey"/> |*-->
<!--DEBUG-->
<!--RESOLVE handed in "Parent Element"
Note: since IfcHelper, while uniquly iterating source objects, also traverses down to respectively nested instances e.g. distribution ports and fires according Production Template
in order to resolve the relation to its parent we need to check the in these cases also handed in as argument parent element-->
Note: since IfcHelper, while uniquly iterating source objects, also traverses down to respectively nested instances e.g. distribution ports and fires according Production Template in order to resolve the relation to its parent we need to check the in these cases also handed in as argument parent element-->
<!--starting from left to right: beginning with "return" value check on parent-->
<xsl:variable name="checkedvalue" select="msxsl:node-set($parentElement)/@*[local-name() = $levelfourkey]"/>
<xsl:variable name="checkedvalue">
<xsl:choose>
<xsl:when test="current()">
<xsl:value-of select="msxsl:node-set($parentElement)/@*[local-name() = $levelfourkey]"/>
</xsl:when>
<!--<xsl:when test="msxsl:node-set($parentElement)//*[local-name() = $levelthreekey]"><xsl:value-of select="msxsl:node-set($parentElement)/@*[local-name() = $levelfourkey]"/></xsl:when>-->
</xsl:choose>
</xsl:variable>
<!-- check if level1 is a valid fieldname of the element -->
<xsl:variable name="levelonevalue">
<xsl:if test="$levelonekey != ''">
......@@ -542,6 +557,7 @@
<!--either the given key is the name of an inverse attribute of the element OR it is a arbitrary objectified relation (which resides in the xml root element of the source model)-->
<xsl:choose>
<xsl:when test="$checkedvalue != '' and contains($simpropfullname, 'simres:HostElement')">
<!--<DEBUG><xsl:value-of select="$parentelem"/></DEBUG>-->
<xsl:call-template name="TargetValueFormatConditions">
<xsl:with-param name="sourcename">
<xsl:value-of select="$levelfourkey"/>
......@@ -744,6 +760,7 @@
</xsl:when>
<xsl:otherwise>
<!--DEBUG-->
<xsl:copy-of select="$parentelem"/>||
<xsl:value-of select="'HelloGeneric'"/>(((<xsl:value-of select="$ifckey"/>)))<!--DEBUG-->
</xsl:otherwise>
</xsl:choose>
......@@ -782,7 +799,8 @@ a property set "PSim_SimController" (on the long run designated for correspondin
occurance it accounts for (e.g. IfcBoiler) via relDefinedByPorperty relation. HERE however this interims concept gets filtered (since we are currently generating content to the target SimModel element) we prefix the contents that come from the mentioned property set and go to the to be created SimController target element after generating the current element 0:1 mapping.-->
<xsl:when test="contains(../../@Name, 'PSim_Controller')">
<xsl:choose>
<xsl:when test="@Name = 'ControllerType'"><!--contains(@Name, 'ControllerType')-->
<xsl:when test="@Name = 'ControllerType'">
<!--contains(@Name, 'ControllerType')-->
<xsl:element name="{normalize-space(concat('eeBIMc_FLAG_', 'SimDummy'))}">
<xsl:value-of select="substring-after($simpropfullname, ':')"/>
</xsl:element>
......@@ -804,6 +822,16 @@ occurance it accounts for (e.g. IfcBoiler) via relDefinedByPorperty relation. HE
<xsl:value-of select="$simdesignatedvalue"/>
</xsl:element>
</xsl:when>
<!--Complex Property resolving-->
<xsl:when test="$subComplexProp != ''"><!-- and current()/HasProperties/IfcPropertySingleValue[@Name = $subComplexProp]-->
<xsl:element name="{normalize-space($simpropfullname)}">
<xsl:for-each select="./ifc:HasProperties/node()">
<xsl:if test="@Name = $subComplexProp">
<xsl:value-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:when>
<xsl:when test="$simdesignatedvalue = 'FALSE'">
<!--if the handed in pset/p name matches -> produce the attribute element -->
<xsl:element name="{normalize-space($simpropfullname)}">
......
......@@ -22,6 +22,7 @@
<xsl:include href="../../IfcBuildingStorey/xsl/IfcBuildingStorey.xsl"/>
<xsl:include href="../../IfcSpace/xsl/IfcSpace.xsl"/>
<!--IFC object transformation templates-->
<xsl:include href="../../IfcSystem/xsl/IfcSystem.xsl"/>
<xsl:include href="../../IfcBuildingSystem/xsl/IfcBuildingSystem.xsl"/>
<xsl:include href="../../IfcDistributionSystem/xsl/IfcDistributionSystem.xsl"/>
<xsl:include href="../../IfcDistributionPort/xsl/IfcDistributionPort.xsl"/>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcBoiler.xsl 3.5.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcBoiler"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcBoiler.xsl 28.6.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcBoiler"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filteredelementscontrollercontents"> <xsl:call-template name="filterAllControllerContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filteredelementscontrollercontents != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="FillControllerSceleton"> <xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment