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