]> matita.cs.unibo.it Git - helm.git/blob - helm/on-line/xslt/metadataControl.xsl
MathQL homepage added
[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:template match="InductiveDefinition">
17  <xsl:for-each select="InductiveType">
18   <xsl:variable name="CICURIInductiveType" select="concat($CICURI,'#xpointer(1/',position())"/>
19   <xsl:variable name="RDFURIInductiveType" select="concat($CICURI,',',position())"/>
20   <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
21   <xsl:call-template name="makelink">
22    <xsl:with-param name="name" select="@name"/>
23    <xsl:with-param name="CICURI" select="concat($CICURIInductiveType,')')"/>
24    <xsl:with-param name="RDFURI" select="$RDFURIInductiveType"/>
25   </xsl:call-template>
26   <xsl:for-each select="Constructor">
27    <xsl:variable name="CICURIConstructor" select="concat($CICURIInductiveType,'/',position(),')')"/>
28    <xsl:variable name="RDFURIConstructor" select="concat($RDFURIInductiveType,',',position())"/>
29    <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
30    <xsl:call-template name="makelink">
31     <xsl:with-param name="name" select="@name"/>
32     <xsl:with-param name="CICURI" select="$CICURIConstructor"/>
33     <xsl:with-param name="RDFURI" select="$RDFURIConstructor"/>
34    </xsl:call-template>
35   </xsl:for-each>
36  </xsl:for-each>
37 </xsl:template>
38
39 <!-- Not an Inductive Type -->
40 <xsl:template match="*">
41   <xsl:call-template name="makelink">
42    <xsl:with-param name="name" select="$CICURI"/>
43    <xsl:with-param name="CICURI" select="$CICURI"/>
44    <xsl:with-param name="RDFURI" select="$CICURI"/>
45   </xsl:call-template>
46 </xsl:template>
47
48 </xsl:stylesheet>