-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimex3.xsl
More file actions
30 lines (25 loc) · 819 Bytes
/
timex3.xsl
File metadata and controls
30 lines (25 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!-- Extract the TIMEX3 elements and print them using defaults. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/TimeML">
<TimeML>
<xsl:apply-templates select="TIMEX3"/>
</TimeML>
</xsl:template>
<xsl:template match="TIMEX3">
<TIMEX3>
<xsl:apply-templates select="@*"/>
<xsl:value-of select="normalize-space(.)"/>
</TIMEX3>
</xsl:template>
<xsl:template match="TIMEX3/@*">
<xsl:copy/>
</xsl:template>
<xsl:template match="TIMEX3/@functionInDocument">
<xsl:if test=".!='NONE'"><xsl:copy/></xsl:if>
</xsl:template>
<xsl:template match="TIMEX3/@temporalFunction">
<xsl:if test=".!='false'"><xsl:copy/></xsl:if>
</xsl:template>
</xsl:stylesheet>