prepareCourseUcCopies.xsl 1.7 KB
Newer Older
lhommeni's avatar
lhommeni committed
1 2 3 4 5 6 7 8 9 10 11
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
  xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
  xmlns:op="utc.fr:ics/opale3"
  xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
  >
  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>

  <xsl:template match="sc:item">
12 13 14 15 16 17 18 19
    <project name="copy-ucs" basedir=".." default="main">
      <property name="in" location="${{basedir}}/input"/>
      <property name="out" location="${{basedir}}/output"/>
      <property name="tmp" location="${{basedir}}/tmp"/>
      <property name="xsl" location="${{basedir}}/xsl"/>
      <property name="lib" location="${{basedir}}/lib"/>
      <property name="log" location="${{basedir}}/log"/>
      <property name="schema" location="${{basedir}}/schema"/>
lhommeni's avatar
lhommeni committed
20 21
      <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
        <classpath>
22
          <pathelement location="./lib/jing.jar"/>
lhommeni's avatar
lhommeni committed
23 24 25 26 27 28 29 30 31 32 33 34 35
        </classpath>
      </taskdef>

      <property file="global.properties"/>

      <target name="main">
        <xsl:apply-templates select=".//sp:courseUc"/>
      </target>
    </project>
  </xsl:template>

  <xsl:template match="sp:courseUc">
    <xslt
36 37 38
        in="${{tmp}}/outputWithCourseUcIds.xml"
        out="${{tmp}}/decompressedOpaleDivided/{@data-export-file}"
        style="${{xsl}}/copyCourseUc.xsl"
lhommeni's avatar
lhommeni committed
39 40 41 42 43 44
        processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
    >

      <param name="elementid" expression="{@data-export-id}"/>
    </xslt>

45
   <jing file="${{tmp}}/decompressedOpaleDivided/{@data-export-file}" rngfile="${{schema}}/op_expUc.rng"></jing>
lhommeni's avatar
lhommeni committed
46 47

  </xsl:template>
48
</xsl:stylesheet>