mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Parse ISO 8601 time format
This is an XSLT implementation of a function to parse the ISO 8601 datetime format used in uddf. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2f9ee8d45
commit
438299ff55
2 changed files with 67 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
|||
xmlns:u="http://www.streit.cc/uddf/3.2/"
|
||||
exclude-result-prefixes="u"
|
||||
version="1.0">
|
||||
<xsl:import href="commonTemplates.xsl"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
|
@ -61,12 +62,11 @@
|
|||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="informationbeforedive/datetime|u:informationbeforedive/u:datetime != ''">
|
||||
<xsl:attribute name="date">
|
||||
<xsl:value-of select="substring-before(informationbeforedive/datetime|u:informationbeforedive/u:datetime, 'T')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="time">
|
||||
<xsl:value-of select="substring-after(informationbeforedive/datetime|u:informationbeforedive/u:datetime, 'T')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="datetime">
|
||||
<xsl:with-param name="value">
|
||||
<xsl:value-of select="informationbeforedive/datetime|u:informationbeforedive/u:datetime"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue