]> matita.cs.unibo.it Git - helm.git/blob - helm/metadata/postgresql_V7_mowgli/metainfo.xsl
Initial revision
[helm.git] / helm / metadata / postgresql_V7_mowgli / metainfo.xsl
1 <?xml version="1.0"?>
2
3 <!--******************************************************************--> 
4 <!-- XSLT version 0.1 generating metadata content of pointers         -->
5 <!-- (backward and forward)                                           -->
6 <!-- First draft: May 24 2002, Irene Schena                           -->
7 <!--******************************************************************-->
8
9 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10                               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
11                               xmlns:h="http://www.cs.unibo.it/helm/schemas/schema-helm#"
12                               xmlns:hth="http://www.cs.unibo.it/helm/schemas/schema-helmth#">
13
14 <xsl:output method="text"/>
15
16 <xsl:param name="path"/>
17
18 <xsl:template match="/">
19   <xsl:apply-templates select="*"/>
20   <xsl:apply-templates select="document(concat('backward/',$path))/rdf:RDF/h:Object/*"/>
21 </xsl:template>
22
23 <!-- to skip blanks -->
24 <xsl:template match="*">
25  <xsl:apply-templates select="*"/>
26 </xsl:template>
27
28 <xsl:template match="h:Object">
29   <xsl:value-of select="@rdf:about"/>
30   <xsl:text>
31 </xsl:text>
32   <xsl:apply-templates select="*"/>
33 </xsl:template>
34
35 <xsl:template match="h:refObj|h:backPointer">
36   <xsl:choose>
37   <xsl:when test="name(.)='h:refObj'">
38    <xsl:text>F|</xsl:text>
39   </xsl:when>
40   <xsl:otherwise>
41    <xsl:text>B|</xsl:text>
42   </xsl:otherwise>
43   </xsl:choose>
44   <xsl:value-of select="h:position/@rdf:resource"/>
45   <xsl:text>|</xsl:text>
46   <xsl:value-of select="h:occurrence/h:Object/@rdf:about"/>
47   <xsl:text>|</xsl:text>
48   <xsl:choose>
49    <xsl:when test="h:depth">
50     <xsl:value-of select="h:depth"/>
51    </xsl:when>
52    <xsl:otherwise>
53     <xsl:text>null</xsl:text>
54    </xsl:otherwise>
55   </xsl:choose>
56   <xsl:text>
57 </xsl:text>
58 </xsl:template>
59
60 </xsl:stylesheet>