IfcPump.xsl 3.49 KB
Newer Older
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- KIT Tool | EneffBIM converter 2016  Version 0.5 (Author KIT BLM) IfcPump.xsl 9.8.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:IfcPump">
		<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>