Project

Profile

Help

How to connect?
Download (4.32 KB) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.7.0.3 / build / samples-common.xml @ cb770b3c

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<project basedir="." default="all" name="Cross-Platform Samples and Use-Cases"
4
    xmlns:dn="antlib:org.apache.ant.dotnet" xmlns:if="ant:if" xmlns:unless="ant:unless">
5
    
6
    <import file="build-constants.xml"/>
7

    
8
    <!-- Location of Feature Keys Tools directory -->
9
    <property name="featureKeys.dir" value="${repository}/tools/featureKeys"
10
              description="Feature Keys directory in development repository"/>
11

    
12
    <!-- Saxon used for some operations -->
13
    <property name="use.EE" value="true" description="Use -EE for documentation, otherwise PE"/>
14
    <property if:true="${use.EE}" name="saxon.edition" value="Enterprise"
15
              description="Enterprise Saxon"/>
16
    <property unless:true="${use.EE}" name="saxon.edition" value="Professional"
17
              description="Professional Saxon"/>
18

    
19
    <path id="saxon.class.path">
20
        <fileset if:true="${use.EE}" dir="${product.dir}/eej">
21
            <include name="*.jar"/>
22
        </fileset>
23
        <fileset unless:true="${use.EE}" dir="${product.dir}/pej">
24
            <include name="*.jar"/>
25
        </fileset>
26
    </path>
27
    
28
    <target name="samples-common" description="Assemble Cross-Platform Samples and Use-Cases">
29
        <mkdir dir="${build-resources.dir}/samples"/>
30
        <copy todir="${product.dir}/resources/use-cases">
31
            <fileset dir="${usecases.dir}"/>
32
        </copy>
33
        <!-- 2015-03-24 DL added to generate annotated configuration file schema for samples -->
34
        <xslt in="${featureKeys.dir}/FeatureKeys.xml" out="${featureKeys.dir}/annotatedConfig.xsd"
35
              style="${featureKeys.dir}/FeatureKeysToSchema.xsl" classpathref="saxon.class.path">
36
            <param name="FeatureKeys" expression="FeatureKeys.xml"/>
37
            <param name="ConfigSchema" expression="config.xsd"/>
38
            <factory name="com.saxonica.config.EnterpriseTransformerFactory">
39
                <attribute name="http://saxon.sf.net/feature/licenseFileLocation"
40
                           value="${saxon.license}"/>
41
                <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
42
                <!-- Bug 2126 may require byte code suppression - remove this when fixed -->
43
                <attribute name="http://saxon.sf.net/feature/optimizationLevel" value="0"/>
44

    
45
            </factory>
46
        </xslt>
47
        <!-- Copy config.xsd from featureKeys.dir too, to make sure that it is up to date -->
48
        <copy file="${featureKeys.dir}/annotatedConfig.xsd" tofile="${samples.dir}/config/annotatedConfig.xsd"/>
49
        <copy todir="${product.dir}/resources/samples">
50
            <fileset dir="${samples.dir}">
51
                <!-- stuff tends to gather in samples, so only select what's needed to be issued -->
52
                <include name="config/config.xml"/>
53
                <include name="config/config-HE.xml"/>
54
                <include name="config/config.xsd"/>
55
                <include name="config/annotatedConfig.xsd"/> <!-- 2015-03-24 DL added -->
56
                <include name="config/saxon-attributes.xsd"/>
57
                <include name="data/books.xml"/>
58
                <include name="data/more-books.xml"/>
59
                <include name="data/othello.xml"/>
60
                <include name="data/books.xsd"/>
61
                <include name="data/books.dtd"/>
62
                <include name="data/play.dtd"/>
63
                <include name="query/tour.xq"/>
64
                <include name="query/books.xq"/>
65
                <include name="query/books-to-html.xq"/>
66
                <include name="scm/scmschema.*"/>
67
                <include name="schemas/validation-reports.xsd"/>
68
                <include name="styles/add-id.xsl"/>
69
                <include name="styles/bible.xsl"/>
70
                <include name="styles/books.xsl"/>
71
                <include name="styles/books.txt"/>
72
                <include name="styles/play.xsl"/>
73
                <include name="styles/identity.xsl"/>
74
                <include name="styles/books-csv.xsl"/>
75
                <include name="styles/books-sa.xsl"/>
76
                <include name="styles/books-sql.xsl"/>
77
                <include name="styles/rename-to-lowercase.xsl"/>
78
                <include name="styles/total.xsl"/>
79
                <include name="styles/tour.xsl"/>
80
                <include name="styles/summarize.xsl"/>
81
            </fileset>
82
        </copy>
83
    </target>
84
</project>
(6-6/7)