]> matita.cs.unibo.it Git - helm.git/blob - helm/header/setheader.xsl
ocaml 3.09 transition
[helm.git] / helm / header / setheader.xsl
1 <?xml version="1.0"?>
2
3 <!--******************************************************************--> 
4 <!-- XSLT version 0.1 of CIC files to CIC files with the header for   -->
5 <!-- applying a stylesheet:                                           -->
6 <!-- First draft: March 10 2000 Irene Schena                          -->
7 <!--******************************************************************-->
8
9 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
10
11 <xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
12
13 <!--SET THE HEADER AND OPEN THE XML FILE-->
14
15 <xsl:template match="hroot">
16     <xsl:variable name="xmlURI"><xsl:value-of select="xml"/></xsl:variable>
17     <xsl:variable name="annURI"><xsl:value-of select="ann"/></xsl:variable>
18     <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
19     <xsl:processing-instruction name="xml-stylesheet">href=&quot;<xsl:value-of select="concat(url,style1)"/>&quot; type="text/xsl"</xsl:processing-instruction>
20     <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
21 <cicxml baseurl="{url}" stylesheet="{style2}" uri="{$xmlURI}">
22     <xsl:apply-templates select="document(concat(string($absPath),$xmlURI))" mode="copyxml"/>
23     <xsl:apply-templates select="document(concat(string($absPath),$annURI))" mode="copyxml"/>
24 </cicxml>
25 </xsl:template>
26
27 <!-- COPY THE XML FILE -->
28
29 <xsl:template match="/" mode="copyxml">
30     <xsl:copy-of select="*"/>
31 </xsl:template>
32
33 </xsl:stylesheet>