migrateFromSimStadt.xsl 5.12 KB
Newer Older
1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="UTF-8" indent="yes" />

	<xsl:template match="/buildingPhysicsLibrary">
		<buildphys:BuildingPhysicsCatalog xmi:version="2.0"
7
8
9
10
			xmlns:xmi="http://www.omg.org/XMI" xmlns:buildphys="http://www.hftstuttgart.de/buildingphysics">
			<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
			<xsl:attribute name="description"><xsl:value-of select="description" /></xsl:attribute>
			<xsl:attribute name="source"><xsl:value-of select="source" /></xsl:attribute>
11
			<xsl:apply-templates select="windowLib" />
12
13
			<xsl:apply-templates select="constructionLib/materialCategory" />
			<xsl:apply-templates select="constructionLib/constructionCategory" />
14
15
16
17
		</buildphys:BuildingPhysicsCatalog>
	</xsl:template>

	<xsl:template match="windowLib">
18
		<xsl:element name="windows">
19
20
21
			<xsl:for-each select="windowType">
				<xsl:element name="windowTypes">
					<xsl:attribute name="windowTypeId">
22
						<xsl:value-of select="'window_'" /><xsl:value-of select="id" /></xsl:attribute>
23
24
25
					<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
					<xsl:attribute name="uValue"><xsl:value-of select="uValue" />
						<xsl:value-of select="' W/(m²·K)'" /></xsl:attribute>
26
					<xsl:attribute name="gValue"><xsl:value-of select="gValue" /></xsl:attribute>
27
					<xsl:attribute name="glazingNumber"><xsl:value-of select="glazingNumber" /></xsl:attribute>
28
					<xsl:attribute name="frameRatio"><xsl:value-of select="frameRatio" /></xsl:attribute>
29
30
31
					<xsl:attribute name="embodiedEnergy"><xsl:value-of select="embodiedEnergy" />
						<xsl:value-of select="' kW·h/m²'" /></xsl:attribute>
					<xsl:attribute name="embodiedCarbon"><xsl:value-of select="embodiedCarbon" />
32
						<xsl:value-of select="' kgCO₂eq/m²'" /></xsl:attribute>
33
34
35
36
					<xsl:attribute name="constructionDescription"><xsl:value-of select="constructionDescription" /></xsl:attribute>
					<xsl:attribute name="disposalEnergy"><xsl:value-of select="disposalEnergy" />
						<xsl:value-of select="' kW·h/m²'" /></xsl:attribute>
					<xsl:attribute name="disposalCarbon"><xsl:value-of select="disposalCarbon" />
37
						<xsl:value-of select="' kgCO₂eq/m²'" /></xsl:attribute>
38
39
40
41
42
43
					<xsl:attribute name="disposalDescription"><xsl:value-of select="disposalDescription" /></xsl:attribute>
				</xsl:element>
			</xsl:for-each>
		</xsl:element>
	</xsl:template>

44
	<xsl:template match="constructionLib/materialCategory">
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
		<xsl:element name="materialCategories">
			<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
			<xsl:apply-templates select="material" />
		</xsl:element>
	</xsl:template>

	<xsl:template match="material">
		<xsl:element name="materials">
			<xsl:attribute name="materialId">
				<xsl:value-of select="'material_'" /><xsl:value-of select="id" />
			</xsl:attribute>
			<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
			<xsl:attribute name="density"><xsl:value-of select="density" />
				<xsl:value-of select="' kg/m³'" /></xsl:attribute>
			<xsl:attribute name="heatCapacity"><xsl:value-of select="heatCapacity" />
				<xsl:value-of select="' J/K'" /></xsl:attribute>
			<xsl:attribute name="conductivity"><xsl:value-of select="conductivity" />
						<xsl:value-of select="' W/(m·K)'" /></xsl:attribute>
			<xsl:attribute name="embodiedEnergy"><xsl:value-of select="embodiedEnergy" />
				<xsl:value-of select="' kW·h/kg'" /></xsl:attribute>
			<xsl:attribute name="embodiedCarbon"><xsl:value-of select="embodiedCarbon" />
66
				<xsl:value-of select="' kgCO₂eq/kg'" /></xsl:attribute>
67
68
69
70
			<xsl:attribute name="constructionDescription"><xsl:value-of select="constructionDescription" /></xsl:attribute>
			<xsl:attribute name="disposalEnergy"><xsl:value-of select="disposalEnergy" />
				<xsl:value-of select="' kW·h/kg'" /></xsl:attribute>
			<xsl:attribute name="disposalCarbon"><xsl:value-of select="disposalCarbon" />
71
				<xsl:value-of select="' kgCO₂eq/kg'" /></xsl:attribute>
72
73
74
75
			<xsl:attribute name="disposalDescription"><xsl:value-of select="disposalDescription" /></xsl:attribute>
		</xsl:element>
	</xsl:template>

76
	<xsl:template match="constructionLib/constructionCategory">
77
78
79
80
81
82
83
		<xsl:element name="constructionCategories">
			<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
			<xsl:apply-templates select="constructionType" />
		</xsl:element>
	</xsl:template>

	<xsl:template match="constructionType">
84
85
86
		<xsl:element name="constructions">
			<xsl:attribute name="constructionId">
				<xsl:value-of select="'construction_'" /><xsl:value-of select="id" />
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
			</xsl:attribute>
			<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
			<xsl:apply-templates select="layer" />
		</xsl:element>
	</xsl:template>

	<xsl:template match="layer">
		<xsl:element name="layers">
			<xsl:attribute name="material">
				<xsl:value-of select="'material_'" /><xsl:value-of select="materialId" />
			</xsl:attribute>
			<xsl:attribute name="thickness"><xsl:value-of select="thickness" />
				<xsl:value-of select="' m'" /></xsl:attribute>
		</xsl:element>
	</xsl:template>

</xsl:stylesheet>