Skip to content

Commit

Permalink
Update bldg:yearOfConstruction and bldg:yearOfDemolition
Browse files Browse the repository at this point in the history
  • Loading branch information
Son-HNguyen committed Apr 2, 2019
1 parent 7d4f0f9 commit 0f6d02a
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions xsl/building.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -110,40 +110,13 @@ SOFTWARE.

<xsl:template match="bldg:yearOfConstruction">
<xsl:element name="con:dateOfConstruction">
<xsl:choose>
<xsl:when test="contains(text(), 'T')">
<xsl:value-of select="concat(text(), '-01-01')" /> <!-- Convert from year to date -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(text(), '-01-01T00:00:00')" />
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>

<xsl:template match="bldg:yearOfRenovation">
<xsl:element name="con:dateOfRenovation">
<xsl:choose>
<xsl:when test="contains(text(), 'T')">
<xsl:value-of select="concat(text(), '-01-01')" /> <!-- Convert from year to date -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(text(), '-01-01T00:00:00')" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="concat(text(), '-01-01')" /> <!-- Convert from year to date -->
</xsl:element>
</xsl:template>

<xsl:template match="bldg:yearOfDemolition">
<xsl:element name="con:dateOfDemolition">
<xsl:choose>
<xsl:when test="contains(text(), 'T')">
<xsl:value-of select="concat(text(), '-01-01')" /> <!-- Convert from year to date -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(text(), '-01-01T00:00:00')" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="concat(text(), '-01-01')" /> <!-- Convert from year to date -->
</xsl:element>
</xsl:template>

Expand Down Expand Up @@ -231,7 +204,7 @@ SOFTWARE.
<xsl:call-template name="con:AbstractGenericApplicationPropertyOfWallSurface" />
</xsl:element>
</xsl:template>

<xsl:template match="bldg:ClosureSurface">
<xsl:element name="ClosureSurface">
<xsl:call-template name="core:AbstractSpaceBoundaryType" />
Expand Down

0 comments on commit 0f6d02a

Please sign in to comment.