]> matita.cs.unibo.it Git - helm.git/blob - helm/on-line/xslt/metadataControl.xsl
metadataControl and demultiplexMutual merged together into metadataControl
[helm.git] / helm / on-line / xslt / metadataControl.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5  xmlns:subst="http://www.cs.unibo.it/helm/subst">
6
7 <xsl:output 
8         method="xml"
9         encoding="iso-8859-1" 
10         media-type="text/html"
11         doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
12         doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
13
14 <xsl:include href="metadataLib.xsl"/>
15
16 <xsl:variable name="url" select="concat($getterURL,'resolve?uri=helm:rdf:www.cs.unibo.it/helm/rdf/forward//')"/>
17
18 <xsl:template match="InductiveDefinition">
19  <xsl:for-each select="InductiveType">
20   <xsl:variable name="CICURIInductiveType" select="concat($CICURI,'#xpointer(1/',position())"/>
21   <xsl:variable name="RDFURIInductiveType" select="concat($CICURI,',',position())"/>
22   <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
23   <xsl:apply-templates select="document(concat($url,$RDFURIInductiveType))" mode="makelink">
24    <xsl:with-param name="name" select="@name"/>
25    <xsl:with-param name="CICURI" select="concat($CICURIInductiveType,')')"/>
26    <xsl:with-param name="RDFURI" select="$RDFURIInductiveType"/>
27   </xsl:apply-templates>
28   <xsl:for-each select="Constructor">
29    <xsl:variable name="CICURIConstructor" select="concat($CICURIInductiveType,'/',position(),')')"/>
30    <xsl:variable name="RDFURIConstructor" select="concat($RDFURIInductiveType,',',position())"/>
31    <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
32    <xsl:apply-templates select="document(concat($url,$RDFURIConstructor))" mode="makelink">
33     <xsl:with-param name="name" select="@name"/>
34     <xsl:with-param name="CICURI" select="$CICURIConstructor"/>
35     <xsl:with-param name="RDFURI" select="$RDFURIConstructor"/>
36    </xsl:apply-templates>
37   </xsl:for-each>
38  </xsl:for-each>
39 </xsl:template>
40
41 <!-- Not an Inductive Type -->
42 <xsl:template match="*">
43   <xsl:apply-templates select="document(concat($url,$CICURI))" mode="makelink">
44    <xsl:with-param name="name" select="$CICURI"/>
45    <xsl:with-param name="CICURI" select="$CICURI"/>
46    <xsl:with-param name="RDFURI" select="$CICURI"/>
47   </xsl:apply-templates>
48 </xsl:template>
49
50 </xsl:stylesheet>