Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / rdf / make-acdc.xsl @ 187

History | View | Annotate | Download (2.7 kB)

1
<XSL:stylesheet
2
    xpath-default-namespace="http://www.tei-c.org/ns/1.0"
3
    xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias" 
4
    xmlns:XSL="http://www.w3.org/1999/XSL/Transform" 
5
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
6
    exclude-result-prefixes="rdf"
7
    version="2.0"
8
>
9

    
10
  <XSL:import href="../common2/odds.xsl"/>
11
  <XSL:import href="../common2/i18n.xsl"/>
12

    
13
  <XSL:key name="EQUIVFILES" match="equiv" use="@filter"/>
14
  <XSL:key name="MEMBERS" match="elementSpec" use="classes/memberOf/@key"/>
15
  <XSL:output method="xml" indent="yes" encoding="utf-8"/>
16
  <XSL:key name="NS" match="elementSpec|attDef" use="@ns"/>
17
  <XSL:param name="useFixedDate">false</XSL:param>
18
  
19
  <XSL:namespace-alias stylesheet-prefix="xsl" result-prefix="XSL"/>
20

    
21
  <XSL:template name="generateDoc">
22
    <XSL:choose>
23
      <XSL:when test="string-length($doclang)&gt;0">
24
        <XSL:value-of select="$doclang"/>
25
      </XSL:when>
26
      <XSL:otherwise>
27
        <XSL:text>en</XSL:text>
28
      </XSL:otherwise>
29
    </XSL:choose>
30
  </XSL:template>
31
  <XSL:template name="bitOut">
32
    <XSL:param name="grammar">true</XSL:param>
33
    <XSL:param name="content"/>
34
    <XSL:copy-of select="$content"/>
35
  </XSL:template>
36
  
37
  <XSL:template match="/">
38
  
39

    
40
  <xsl:stylesheet version="2.0"
41
		  xpath-default-namespace="http://www.tei-c.org/ns/1.0"
42
		  xmlns:XSL="http://www.w3.org/1999/XSL/Transform">
43

    
44
    <xsl:import href="../tools/getfiles.xsl"/>
45

    
46
    <XSL:for-each select="distinct-values(//equiv/@filter)">
47
	<xsl:import href="{.}"/>  
48
    </XSL:for-each>
49
    
50
    <xsl:param name="corpus">./</xsl:param>
51
 
52
    <xsl:template match="*">
53
      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
54
    </xsl:template>
55
   
56
    <xsl:template match="text()|comment()|@*|processing-instruction()"/>
57

    
58
    <XSL:for-each select="//equiv[@filter]">
59
      <xsl:template>
60
	<XSL:variable name="f" select="@filter"/>
61
	<XSL:attribute name="match">
62
	  <XSL:value-of select="ancestor::elementSpec/@ident"/>
63
	</XSL:attribute>
64
	<xsl:call-template name="{@name}"/>
65
      </xsl:template>
66
    </XSL:for-each>
67

    
68
    <xsl:template name="typology">
69
      <E55_Type rdf:about="http://www.tei-c.org/type/place" xmlns="http://purl.org/NET/crm-owl#" >
70
	<label xmlns="http://www.w3.org/2000/01/rdf-schema#" >place</label>
71
      </E55_Type>
72
      <XSL:for-each select="key('MEMBERS','model.placeNamePart')">
73
	<E55_Type rdf:about="http://www.tei-c.org/type/place/{@ident}" xmlns="http://purl.org/NET/crm-owl#" >
74
	<label xmlns="http://www.w3.org/2000/01/rdf-schema#" >
75
	  <XSL:call-template name="makeDescription"/>
76
	</label>
77
	<P127_has_broader_term rdf:resource="http://www.tei-c.org/type/place"/>
78
      </E55_Type>
79
      </XSL:for-each>
80
    </xsl:template>
81
    
82
  </xsl:stylesheet>
83

    
84
</XSL:template>
85

    
86
</XSL:stylesheet>