Commit e776e6ad authored by RWimmer's avatar RWimmer
parents 70f4a1fd 40907822
<?xml version="1.0" encoding="utf-8"?>
<!-- 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
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) GenerateTargetElement.xsl 12.7.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:variable name="elementId" select="@GlobalId"/> <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:with-param name="elementId" select="$elementId"/> </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: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_')) or not(starts-with(local-name(), 'eeBIMrp_FLAG_'))"> <xsl:copy-of select="current()"/> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template name="filterAllOtherContents"> <xsl:param name="input"/> <xsl:param name="token"/> <xsl:variable name="filter"> <xsl:for-each select="msxsl:node-set($input)/node()"> <xsl:if test="starts-with(local-name(), $token)"> <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="FillSceleton"> <xsl:param name="taggedTargetContent"/> <xsl:param name="prefixToken"/> <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="substring-before(text(), ' ' )"/> </xsl:variable> <xsl:element name="{normalize-space($designatedElementTargetName)}"> <xsl:attribute name="RefId"><xsl:value-of select="normalize-space(substring-after(text(), ' ' ))"/></xsl:attribute> <xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()"> <xsl:if test="not(contains(name(), 'SimDummy')) and normalize-space(substring-after(local-name(),$prefixToken)) != '' and substring-before(text(), ' ') != ''"> <xsl:element name="{normalize-space(substring-before(text(), ' '))}"> <xsl:value-of select="substring-after(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) 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
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcActor.xsl 12.7.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 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
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcController.xsl 12.7.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="tryAssembleTargetController"> <xsl:param name="input"/> <xsl:variable name="filterAllControllerContents"> <xsl:call-template name="filterAllOtherContents"> <xsl:with-param name="input" select="$input"/> <xsl:with-param name="token" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filterAllControllerContents != 'FALSE'"> <xsl:call-template name="FillSceleton"> <xsl:with-param name="taggedTargetContent" select="$filterAllControllerContents"/> <xsl:with-param name="prefixToken" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:when> <xsl:otherwise> FALSE </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) 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
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcOccupant.xsl 12.7.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) 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
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcTank.xsl 12.7.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="filtercontrollercontent"> <xsl:call-template name="tryAssembleTargetController"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filterreferencepropertycontent"> <xsl:call-template name="tryAssembleTargetElement"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="mergeGeneratedContents"> <xsl:choose> <xsl:when test="$filtercontrollercontent != 'FALSE' or $filterreferencepropertycontent != '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="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </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" select="$mergeGeneratedContents"/> </xsl:call-template> <xsl:copy-of select="$filtercontrollercontent"/> <xsl:copy-of select="$filterreferencepropertycontent"/> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
......@@ -76,6 +76,7 @@
<xsl:param name="KeyPool"/>
<xsl:param name="preEvaluation"/>
<!--Check wether IfcElement is instance (else ignore reference object with @ref="...")-->
<xsl:variable name="elementId" select="@GlobalId"/>
<xsl:if test="current()[@GlobalId]">
<!--or $preEvaluation != ''"-->
<xsl:for-each select=".">
......@@ -124,6 +125,7 @@
<xsl:call-template name="IfcPropertySet">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
<xsl:with-param name="preEvaluation" select="$preEvaluation"/>
<xsl:with-param name="elementId" select="$elementId"/>
</xsl:call-template>
</xsl:for-each>
<!--</xsl:variable>-->
......@@ -186,4 +188,72 @@
<xsl:copy-of select="$unsortedtargetcontent"/>
</xsl:if>-->
</xsl:template>
<!--we need some helper to filter the generated contents from the controller out of the collection with all contents generated for a element (e.g. IfcBoiler-->
<!--Note: this concept (to add a certain property set "PSim_SimController" to a element like IfcBoiler in order to trigger a corrosponding SimController element generation) is done as a intermediate step within the project - on the long run however it is planed to use a given occurrance of IfcController (with a valid ifc-kind of referencing it to the corrosponding element like IfcBoiler) on side of source IFC model to transform it to its target representation in SimModel-->
<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_')) or not(starts-with(local-name(), 'eeBIMrp_FLAG_'))">
<xsl:copy-of select="current()"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="filterAllOtherContents">
<xsl:param name="input"/>
<xsl:param name="token"/>
<xsl:variable name="filter">
<xsl:for-each select="msxsl:node-set($input)/node()">
<xsl:if test="starts-with(local-name(), $token)">
<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="FillSceleton">
<xsl:param name="taggedTargetContent"/>
<xsl:param name="prefixToken"/>
<!--TESTWISE produce intended controller element-->
<!--<xsl:if test="$filteredelementscontrollercontents != 'FALSE'">-->
<!--<xsl:element name="SimActor_Actor_Default">
IFC side TRIGGER from Psim_SimController bound to ((<xsl:value-of select="concat(current()/@name, current()/@GlobalId)"/>)):
-->
<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="substring-before(text(), ' ' )"/>
<!--<xsl:value-of select="normalize-space(substring-after(local-name(), 'eeBIMc_FLAG_'))"/>-->
</xsl:variable>
<!--SCELETON-->
<xsl:element name="{normalize-space($designatedElementTargetName)}">
<xsl:attribute name="RefId"><xsl:value-of select="normalize-space(substring-after(text(), ' ' ))"/></xsl:attribute>
<!--<xsl:copy-of select="./*"/>-->
<!--static template call "Fill Sceleton":-->
<!--<xsl:call-template name="IfcController"/>-->
<xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()">
<xsl:if test="not(contains(name(), 'SimDummy')) and normalize-space(substring-after(local-name(),$prefixToken)) != '' and substring-before(text(), ' ') != ''">
<!--<xsl:element name="SimActor_Actor_Default">
<xsl:value-of select="text()"/>
</xsl:element>-->
<xsl:element name="{normalize-space(substring-before(text(), ' '))}">
<xsl:value-of select="substring-after(text(), ' ')"/>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:element>
<!--SCELETON-->
</xsl:when>
</xsl:choose>
</xsl:for-each>
<!--</xsl:element>-->
<!--<SimController>
Hello controller!
</SimController>-->
</xsl:template>
</xsl:stylesheet>
<?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="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: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="*"/>
<!--the IfcBoiler template-->
......@@ -37,65 +30,47 @@
</xsl:call-template>
<!--</xsl:copy>-->
</xsl:variable>
<!--VARIA TEST arbitrary controller element generation-->
<!--we need to introduce one additional xsl:variable as intermediate step because with the content of target element SimBoiler also the content for the corrosponding SimController was generated which we need to filter-->
<xsl:variable name="filteredelementscontrollercontents">
<xsl:call-template name="filterAllControllerContents">
<!--we need to introduce additional xsl:variable as intermediate step because with the content of target element also the content of e.g. corrosponding controller was generated which we need to filter and assemble-->
<xsl:variable name="filtercontrollercontent">
<xsl:call-template name="tryAssembleTargetController">
<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>
<!--Call the Generic Generation Template-->
<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:copy-of select="$generictargetcontent"/>-->
<!--<xsl:copy-of select="$resolvedfromproperties"/>-->
<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>
<!--TESTWISE produce arbitrary target controller element-->
<!--<xsl:if test="$filteredelementscontrollercontents != 'FALSE'">-->
<!--DEBUG-->
<!--<xsl:element name="SimActor_Actor_Default">
<xsl:copy-of select="$filteredelementscontrollercontents"/>
<xsl:copy-of select="$filteredcurrentelementcontents"/>
</xsl:element>-->
<!--DEBUG-->
<!--<SimController>
Hello controller!
</SimController>-->
<xsl:call-template name="FillControllerSceleton">
<xsl:with-param name="taggedTargetContent" select="$filteredelementscontrollercontents"/>
</xsl:call-template>
<!--</xsl:if>-->
</xsl:when>
<xsl:otherwise>
<!--Call the Generic Generation Template-->
<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:copy-of select="$generictargetcontent"/>-->
<!--<xsl:copy-of select="$resolvedfromproperties"/>-->
<xsl:call-template name="MergeTargetElementContentCollections">
<xsl:with-param name="generictargetcontent" select="$generictargetcontent"/>
<xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/>
<xsl:variable name="filterreferencepropertycontent">
<xsl:call-template name="tryAssembleTargetElement">
<xsl:with-param name="input" select="$resolvedfromproperties"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="mergeGeneratedContents">
<xsl:choose>
<xsl:when test="$filtercontrollercontent != 'FALSE' or $filterreferencepropertycontent != 'FALSE'">
<xsl:variable name="filteredcurrentelementcontents">
<xsl:call-template name="filterAllElementContents">
<xsl:with-param name="input" select="$resolvedfromproperties"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="MergeTargetElementContentCollections">
<xsl:with-param name="generictargetcontent" select="$generictargetcontent"/>
<xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="MergeTargetElementContentCollections">
<xsl:with-param name="generictargetcontent" select="$generictargetcontent"/>
<xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--Call the Generic Generation Template-->
<xsl:call-template name="GenerateTargetElement">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
<xsl:with-param name="simelemname" select="$simelemname"/>
<xsl:with-param name="unsortedtargetcontent" select="$mergeGeneratedContents"/>
</xsl:call-template>
<!--in case additional elements were generated add to RST-->
<xsl:copy-of select="$filtercontrollercontent"/>
<xsl:copy-of select="$filterreferencepropertycontent"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<?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="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: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="*"/>
<!--the IfcBoiler template-->
<!--the IfcController template-->
<xsl:template name="IfcController" match="ifc:IfcController" mode="experimental">
<SimController_SupplyWater_Temperature RefId="ID877">
<simcore:SimUniqueID>ef8214c0-7b34-45cf-a4f5-b4a0473ccf13</simcore:SimUniqueID>
......@@ -30,67 +23,24 @@
</xsl:template>
<!--we need some helper to filter the generated contents from the controller out of the collection with all contents generated for a element (e.g. IfcBoiler-->
<!--Note: this concept (to add a certain property set "PSim_SimController" to a element like IfcBoiler in order to trigger a corrosponding SimController element generation) is done as a intermediate step within the project - on the long run however it is planed to use a given occurrance of IfcController (with a valid ifc-kind of referencing it to the corrosponding element like IfcBoiler) on side of source IFC model to transform it to its target representation in SimModel-->
<xsl:template name="filterAllElementContents">
<xsl:template name="tryAssembleTargetController">
<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 name="filterAllControllerContents">
<xsl:call-template name="filterAllOtherContents">
<xsl:with-param name="input" select="$input"/>
<xsl:with-param name="token" select="'eeBIMc_FLAG_'"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="msxsl:node-set($filter)/node()">
<xsl:copy-of select="$filter"/>
<xsl:when test="$filterAllControllerContents != 'FALSE'">
<xsl:call-template name="FillSceleton">
<xsl:with-param name="taggedTargetContent" select="$filterAllControllerContents"/>
<xsl:with-param name="prefixToken" select="'eeBIMc_FLAG_'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>FALSE</xsl:otherwise>
<xsl:otherwise>
FALSE
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="FillControllerSceleton">
<xsl:param name="taggedTargetContent"/>
<!--TESTWISE produce intended controller element-->
<!--<xsl:if test="$filteredelementscontrollercontents != 'FALSE'">-->
<!--<xsl:element name="SimActor_Actor_Default">
IFC side TRIGGER from Psim_SimController bound to ((<xsl:value-of select="concat(current()/@name, current()/@GlobalId)"/>)):
-->
<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:value-of select="normalize-space(substring-after(local-name(), 'eeBIMc_FLAG_'))"/>-->
</xsl:variable>
<!--SCELETON-->
<xsl:element name="{normalize-space($designatedElementTargetName)}">
<!--<xsl:copy-of select="./*"/>-->
<!--static template call "Fill Sceleton":-->
<!--<xsl:call-template name="IfcController"/>-->
<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>
<!--SCELETON-->
</xsl:when>
</xsl:choose>
</xsl:for-each>
<!--</xsl:element>-->
<!--<SimController>
Hello controller!
</SimController>-->
</xsl:template>
</xsl:stylesheet>
<?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:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1"
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:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" 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:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl">
<xsl:template name="IfcPropertySet">
<!-- match="ifc:IfcPropertySet"-->
<xsl:param name="KeyPool"/>
<xsl:param name="preEvaluation"/>
<xsl:param name="elementId"/>
<xsl:if test="$KeyPool != '' or $preEvaluation != ''">
<!--$psid = 'none' or $psid != ''" -->
<!--CASE1: nested -->
......@@ -25,7 +19,7 @@
<!--<xsl:copy-of select="current()"/>-->
<!--<xsl:value-of select="$KeyPool"/>-->
<xsl:for-each select="current()/ifc:HasProperties/node()">
<!--check wether the property instance is NESTED or REFerenced-->
<!--check whether the property instance is NESTED or REFerenced-->
<xsl:choose>
<!--nested-->
<xsl:when test="not(current()[@ref | @href])">
......@@ -46,6 +40,7 @@
<xsl:with-param name="pname" select="$pname"/>
<xsl:with-param name="pvalue" select="$pvalue"/>
<xsl:with-param name="preEvaluation" select="$preEvaluation"/>
<xsl:with-param name="elementId" select="$elementId"/>
</xsl:call-template>
</xsl:when>
<!--needs REF resolve first-->
......@@ -72,6 +67,7 @@
<xsl:with-param name="pname" select="$pname"/>
<xsl:with-param name="pvalue" select="$pvalue"/>
<xsl:with-param name="preEvaluation" select="$preEvaluation"/>
<xsl:with-param name="elementId" select="$elementId"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
......@@ -96,7 +92,7 @@
<!--<xsl:copy-of select="current()"/>-->
<!--<xsl:value-of select="$KeyPool"/>-->
<xsl:for-each select="current()/ifc:HasProperties/node()">
<!--check wether the property instance is NESTED or REFerenced-->
<!--check whether the property instance is NESTED or REFerenced-->
<xsl:choose>
<!--nested-->
<xsl:when test="not(current()[@ref | @href])">
......@@ -113,6 +109,7 @@
<xsl:with-param name="pname" select="$pname"/>
<xsl:with-param name="pvalue" select="$pvalue"/>
<xsl:with-param name="preEvaluation" select="$preEvaluation"/>
<xsl:with-param name="elementId" select="$elementId"/>
</xsl:call-template>
</xsl:when>
<!--needs REF resolve first-->
......@@ -139,6 +136,7 @@
<xsl:with-param name="pname" select="$pname"/>
<xsl:with-param name="pvalue" select="$pvalue"/>
<xsl:with-param name="preEvaluation" select="$preEvaluation"/>
<xsl:with-param name="elementId" select="$elementId"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
......@@ -177,6 +175,24 @@
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="resolveReferenceProperty">
<!--in case of nested instances of IfcTimeSeries, we need to prepare it (add interims "GlobalId" attribute and generate the corresponding SimModel element)-->
<xsl:if test="local-name() = 'IfcPropertyReferenceValue'">
<xsl:for-each select="current()/ifc:PropertyReference/node()">
<!--<xsl:call-template name="KeyPoolHelper">
<xsl:with-param name="currentElement" select="name()"/>
</xsl:call-template>-->
<xsl:variable name="buildKeyPool">
<xsl:call-template name="KeyPoolBuilder">
<xsl:with-param name="ElementName" select="local-name()"/>
</xsl:call-template>
</xsl:variable>
<xsl:apply-templates select="current()">
<xsl:with-param name="KeyPool" select="$buildKeyPool"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:if>
</xsl:template>
<!--Helper templates in the context of properties bound to object occurance-->
<!--objectified association IfcRelDefinesByProperties-->
<xsl:template name="ResolveIfcRelDefinesByProperties">
......@@ -214,11 +230,11 @@
<xsl:param name="PSByRelDef"/>
<xsl:param name="PSByType"/>
<!--CASE 1: Properties are directly referenced-->
<xsl:for-each select="msxsl:node-set($PSByType)/ifc:IfcPropertySet/ifc:HasProperties/ifc:IfcPropertySingleValue">
<xsl:for-each select="msxsl:node-set($PSByType)/ifc:IfcPropertySet/ifc:HasProperties/node()">
<xsl:variable name="Name" select="@Name"/>
<xsl:variable name="psetName" select="../../@Name"/>
<xsl:variable name="psetGlobalID" select="../../@GlobalId"/>
<xsl:for-each select="msxsl:node-set($PSByRelDef)/ifc:IfcPropertySet/ifc:HasProperties/ifc:IfcPropertySingleValue">
<xsl:for-each select="msxsl:node-set($PSByRelDef)/ifc:IfcPropertySet/ifc:HasProperties/node()">
<xsl:variable name="RelDefPropertyName" select="@Name"/>
<xsl:variable name="RelDefPropertySetName" select="../../@Name"/>
<xsl:if test="current()[../../@Name = $psetName]">
......@@ -268,10 +284,54 @@
</xsl:for-each>
<xsl:copy-of select="$firstCollection"/>
</xsl:template>
<xsl:template name="ConcatPsetCollections">
<!--<xsl:template name="ConcatPsetCollections">
<xsl:param name="PSByRelDef"/>
<xsl:param name="PSByType"/>
<xsl:copy-of select="$PSByRelDef"/>
<xsl:copy-of select="$PSByType"/>
</xsl:template>-->
<!--we need some helper to filter the generated contents from the controller out of the collection with all contents generated for a element (e.g. IfcBoiler-->
<!--Note: this concept (to add a certain property set "PSim_SimController" to a element like IfcBoiler in order to trigger a corrosponding SimController element generation) is done as a intermediate step within the project - on the long run however it is planed to use a given occurrance of IfcController (with a valid ifc-kind of referencing it to the corrosponding element like IfcBoiler) on side of source IFC model to transform it to its target representation in SimModel-->
<xsl:template name="tryAssembleTargetElement">
<xsl:param name="input"/>
<xsl:variable name="filterAllElementContents">
<xsl:call-template name="filterAllOtherContents">
<xsl:with-param name="input" select="$input"/>
<xsl:with-param name="token" select="'eeBIMrp_FLAG_'"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$filterAllElementContents != 'FALSE'">
<xsl:call-template name="FillSceleton">
<xsl:with-param name="taggedTargetContent" select="$filterAllElementContents"/>
<xsl:with-param name="prefixToken" select="'eeBIMrp_FLAG_'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
FALSE
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="resolveRefPropContent">
<xsl:param name="KeyPool"/>
<xsl:choose>
<xsl:when test="contains($KeyPool, '§') and contains(substring-before($KeyPool, '§'), ' ') and not(substring-before(substring-before($KeyPool, '§'), ' ')=local-name())">
<!-- -->
<xsl:element name="{normalize-space(concat('eeBIMrp_FLAG_', substring-after(substring-after(substring-before($KeyPool, '§'), ' Sim'), ':')))}">
<xsl:value-of select="concat(substring-after(substring-after(substring-before($KeyPool, '§'), ' Sim'), '.'),' ')"/>
<xsl:value-of select="@*[local-name() = substring-after(substring-before(substring-before($KeyPool, '§'), ' '),'###.###.')]"/>
</xsl:element>
<xsl:call-template name="resolveRefPropContent">
<xsl:with-param name="KeyPool" select="substring-after($KeyPool, '§')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:if test="contains($KeyPool, '§')">
<xsl:call-template name="resolveRefPropContent">
<xsl:with-param name="KeyPool" select="substring-after($KeyPool, '§')"/>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
<?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="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: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="*"/>
<!--the IfcPump template-->
......@@ -17,7 +10,8 @@
<!--debug-->
<!--<xsl:element name="SimFlowMover_Pump_VariableSpeedReturn">
<xsl:value-of select="$KeyPool"/>
</xsl:element>--><!--debug-->
</xsl:element>-->
<!--debug-->
<xsl:variable name="simelemname">
<xsl:call-template name="getTargetElementName">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
......@@ -41,65 +35,47 @@
</xsl:call-template>
<!--</xsl:copy>-->
</xsl:variable>
<!--VARIA TEST arbitrary controller element generation-->
<!--we need to introduce one additional xsl:variable as intermediate step because with the content of target element SimBoiler also the content for the corrosponding SimController was generated which we need to filter-->
<xsl:variable name="filteredelementscontrollercontents">
<xsl:call-template name="filterAllControllerContents">
<!--we need to introduce additional xsl:variable as intermediate step because with the content of target element also the content of e.g. corrosponding controller was generated which we need to filter and assemble-->
<xsl:variable name="filtercontrollercontent">
<xsl:call-template name="tryAssembleTargetController">
<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>
<!--Call the Generic Generation Template-->
<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:copy-of select="$generictargetcontent"/>-->
<!--<xsl:copy-of select="$resolvedfromproperties"/>-->
<xsl:call-template name="MergeTargetElementContentCollections">
<xsl:with-param name="generictargetcontent" select="$generictargetcontent"/>