-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathss_geneanet.xsl
35 lines (29 loc) · 904 Bytes
/
ss_geneanet.xsl
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
31
32
33
34
35
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output
method="xml"
version="1.0"
indent="yes"
omit-xml-declaration="yes"
encoding="utf-8"/>
<xsl:template match="/">
<lnames namelist="true">
<xsl:apply-templates select="//table[@style]" />
</lnames>
</xsl:template>
<xsl:template match="table">
<xsl:apply-templates select="tr[position() > 1]" />
</xsl:template>
<xsl:template match="tr">
<xsl:variable name="freq" select="translate(td[2],' ','')" />
<xsl:element name="nom">
<xsl:attribute name="freq">
<xsl:value-of select="floor(($freq) div 1000)" />
</xsl:attribute>
<xsl:value-of select="normalize-space(td[1])" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>