IfcGroup.xsl 3.09 KB
Newer Older
1 2 3 4 5 6 7 8
<?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:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
	<xsl:strip-space elements="*"/>
	<!--the IfcGroup template-->
	<xsl:template match="ifc:IfcGroup">
		<xsl:param name="KeyPool"/>
9
		<xsl:param name="parentElement"/>
10 11 12 13 14 15 16 17 18 19 20 21 22
		<xsl:if 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:element name="simcore:SimUniqueID">TTT</xsl:element>-->
				<!-- generate current's target elements specific fields and attributes (e.g. UniqueId)-->
				<!--<xsl:copy>-->
				<xsl:call-template name="resolvekeypool">
					<xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/>
					<xsl:with-param name="elemname" select="name()"/>
23
					<xsl:with-param name="parentElement" select="$parentElement"/>
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
				</xsl:call-template>
				<!--</xsl:copy>-->
			</xsl:variable>
			<xsl:variable name="resolvedfromproperties">
				<!-- generate target element content from current source object's properties-->
				<!--<xsl:copy>-->
				<xsl:call-template name="GenerateTargetElementContentsFromSourceProperties">
					<xsl:with-param name="KeyPool" select="$KeyPool"/>
				</xsl:call-template>
				<!--</xsl:copy>-->
			</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="$resolvedfromproperties"/>
					</xsl:call-template>
				</xsl:with-param>
			</xsl:call-template>
			<!--DEBUG-->
			<!--SimList_EquipmentList_ZoneHvac-->
			<!--<xsl:element name="{$simelemname}">
				<xsl:copy-of select="$simelemname"/>
				<xsl:copy-of select="@id"/>
				<xsl:copy-of select="$KeyPool"/>
				<xsl:copy-of select="$resolvedfromproperties"/>
			</xsl:element>-->
			<!--DEBUG-->
		</xsl:if>
			
	</xsl:template>
</xsl:stylesheet>