]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/header/setheader.xsl
Initial revision
[helm.git] / helm / header / setheader.xsl
diff --git a/helm/header/setheader.xsl b/helm/header/setheader.xsl
new file mode 100644 (file)
index 0000000..a1ba131
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!--******************************************************************--> 
+<!-- XSLT version 0.1 of CIC files to CIC files with the header for   -->
+<!-- applying a stylesheet:                                           -->
+<!-- First draft: March 10 2000 Irene Schena                          -->
+<!--******************************************************************-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+
+<!--SET THE HEADER AND OPEN THE XML FILE-->
+
+<xsl:template match="hroot">
+    <xsl:variable name="xmlURI"><xsl:value-of select="xml"/></xsl:variable>
+    <xsl:variable name="annURI"><xsl:value-of select="ann"/></xsl:variable>
+    <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction>
+    <xsl:processing-instruction name="xml-stylesheet">href=&quot;<xsl:value-of select="concat(url,style1)"/>&quot; type="text/xsl"</xsl:processing-instruction>
+    <xsl:processing-instruction name="cocoon-process">type="xslt"</xsl:processing-instruction>
+<cicxml baseurl="{url}" stylesheet="{style2}" uri="{$xmlURI}">
+    <xsl:apply-templates select="document(concat(string($absPath),$xmlURI))" mode="copyxml"/>
+    <xsl:apply-templates select="document(concat(string($absPath),$annURI))" mode="copyxml"/>
+</cicxml>
+</xsl:template>
+
+<!-- COPY THE XML FILE -->
+
+<xsl:template match="/" mode="copyxml">
+    <xsl:copy-of select="*"/>
+</xsl:template>
+
+</xsl:stylesheet>