| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER |
| |
| Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved. |
| |
| Use is subject to license terms. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| use this file except in compliance with the License. You may obtain a copy |
| of the License at http://www.apache.org/licenses/LICENSE-2.0. You can also |
| obtain a copy of the License at http://odftoolkit.org/docs/license.txt |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <project name="odfxsltrunnertask-samples" default="default" basedir="."> |
| <description>Builds, tests, and runs the project odfxsltrunnertask.</description> |
| <import file="nbproject/build-impl.xml"/> |
| |
| <property file="ant.properties" prefix="user"/> |
| <import file="${user.project.odfxsltrunner}/build-schemas.xml"/> |
| |
| <target name="-post-init" depends="-init-schema-props" |
| description="Initialize schema properties"> |
| <condition property="reference.odf2xhtml.xsl" value="${user.reference.odf2xhtml.xsl}"> |
| <not> |
| <isset property="reference.odf2xhtml.xsl"/> |
| </not> |
| </condition> |
| <condition property="reference.saxon.jar" value="${user.reference.saxon.jar}"> |
| <not> |
| <isset property="reference.saxon.jar"/> |
| </not> |
| </condition> |
| <condition property="exec.xmllint" value="${user.exec.xmllint}"> |
| <not> |
| <isset property="exec.xmllint"/> |
| </not> |
| </condition> |
| <condition property="exec.xmllint.path" value="${user.exec.xmllint.path}"> |
| <not> |
| <isset property="exec.xmllint.path"/> |
| </not> |
| </condition> |
| </target> |
| |
| <target name="add-v12-all-parts-xref-product" depends="add-v12-part1-xref-product,add-v12-part2-xref-product,add-v12-part3-xref-product" |
| description="Add cross references to ODF 1.2 specification (all parts)."/> |
| |
| <target name="add-v12-part0-xref-product" depends="init,jar" |
| description="Add cross references to ODF 1.2 part 0 specification."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part0.state.target}.odt"/> |
| <property name="part1.spec-target.noext" value="OpenDocument-v1.2${opendocument.v12.part1.target}"/> |
| <property name="part2.spec-target.noext" value="OpenDocument-v1.2${opendocument.v12.part2.target}"/> |
| <property name="part3.spec-target.noext" value="OpenDocument-v1.2${opendocument.v12.part3.target}"/> |
| <unzip src="${opendocument.v12.product.dir}/${part1.spec-target.noext}.odt" dest="${build.dir}/${part1.spec-target.noext}-odt"> |
| <patternset> |
| <include name="content.xml"/> |
| </patternset> |
| </unzip> |
| <unzip src="${opendocument.v12.product.dir}/${part2.spec-target.noext}.odt" dest="${build.dir}/${part2.spec-target.noext}-odt"> |
| <patternset> |
| <include name="content.xml"/> |
| </patternset> |
| </unzip> |
| <unzip src="${opendocument.v12.product.dir}/${part3.spec-target.noext}.odt" dest="${build.dir}/${part3.spec-target.noext}-odt"> |
| <patternset> |
| <include name="content.xml"/> |
| </patternset> |
| </unzip> |
| <property name="part1-dir" location="${build.dir}/${part1.spec-target.noext}-odt"/> |
| <property name="part2-dir" location="${build.dir}/${part2.spec-target.noext}-odt"/> |
| <property name="part3-dir" location="${build.dir}/${part3.spec-target.noext}-odt"/> |
| <condition property="force"> |
| <not> |
| <and> |
| <uptodate srcfile="${part1-dir}/content.xml" targetfile="${target-file}"/> |
| <uptodate srcfile="${part2-dir}/content.xml" targetfile="${target-file}"/> |
| <uptodate srcfile="${part3-dir}/content.xml" targetfile="${target-file}"/> |
| </and> |
| </not> |
| </condition> |
| |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/create-embedded-xref.xsl" |
| in="${opendocument.v12.part0.spec-source}" |
| out="${target-file}" |
| force="${force}"> |
| <param name="add-xrefs" expression="false"/> |
| <param name="keep-anchors" expression="false"/> |
| <param name="toc-hyperlink-mode" expression="adapt"/> |
| <param name="part1-content-path" expression="jar:file:${opendocument.v12.product.dir}/${part1.spec-target.noext}.odt!/content.xml"/> |
| <param name="part2-content-path" expression="jar:file:${opendocument.v12.product.dir}/${part2.spec-target.noext}.odt!/content.xml"/> |
| <param name="part3-content-path" expression="jar:file:${opendocument.v12.product.dir}/${part3.spec-target.noext}.odt!/content.xml"/> |
| <param name="part1-toc-rel-path" expression="${part1.spec-target.noext}.odt"/> |
| <param name="part2-toc-rel-path" expression="${part2.spec-target.noext}.odt"/> |
| <param name="part3-toc-rel-path" expression="${part3.spec-target.noext}.odt"/> |
| </odfxslt> |
| </target> |
| |
| <target name="update-rel-paths v12-part0-xref-product" depends="init,jar" |
| description="Add cross references to ODF 1.2 part 0 specification."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part0.state.target}.odt"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/update-toc-rel-paths.xsl" |
| in="${opendocument.v12.product.dir}/OpenDocument-v1.2${opendocument.v12.part0.state.target}-orig.odt" |
| out="${target-file}"> |
| <param name="state-new" expression="${opendocument.v12.part0.state.target}"/> |
| </odfxslt> |
| </target> |
| |
| <target name="add-v12-part1-xref-editor-revision" depends="init,jar,-create-v12-xref-schema" |
| description="Add cross references to ODF 1.2 specification without removing anchors."> |
| <antcall target="-add-v12-part1-xref"> |
| <param name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part1.target}-editor-revision.odt"/> |
| <param name="keep-anchors" value="true"/> |
| </antcall> |
| </target> |
| |
| <target name="add-v12-part1-xref-product" depends="init,jar,-create-v12-xref-schema" |
| description="Add cross references to ODF 1.2 specification."> |
| <antcall target="-add-v12-part1-xref"> |
| <param name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part1.target}.odt"/> |
| <param name="keep-anchors" value="false"/> |
| </antcall> |
| </target> |
| |
| <target name="-add-v12-part1-xref" depends="init,jar,-create-v12-xref-schema" |
| description="Add cross references to ODF 1.2 specification."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="xref-schema-file" location="${build.dir}/schema/flat/${opendocument.v12.schema.xref}"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${xref-schema-file}" targetfile="${target-file}"/> |
| </not> |
| </condition> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/create-embedded-xref.xsl" |
| in="${opendocument.v12.part1.spec-source}" |
| out="${target-file}" |
| force="${force}"> |
| <param name="xref-schema-file" expression="${xref-schema-file}"/> |
| <param name="add-xrefs" expression="true"/> |
| <param name="keep-anchors" expression="${keep-anchors}"/> |
| </odfxslt> |
| </target> |
| |
| <target name="add-v12-part2-xref-product" depends="init,jar" |
| description="Add cross references to ODF 1.2 specification."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part2.target}.odt"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/create-embedded-xref.xsl" |
| in="${opendocument.v12.part2.spec-source}" |
| out="${target-file}" |
| force="false"> |
| <param name="add-xrefs" expression="true"/> |
| <param name="keep-anchors" expression="false"/> |
| </odfxslt> |
| </target> |
| |
| <target name="add-v12-part3-xref-editor-revision" depends="init,jar,-create-v12-manifest-xref-schema" |
| description="Add cross references to ODF 1.2 specification without removing anchors."> |
| <antcall target="-add-v12-part3-xref"> |
| <param name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part3.target}-editor-revision.odt"/> |
| <param name="keep-anchors" value="true"/> |
| </antcall> |
| </target> |
| |
| <target name="add-v12-part3-xref-product" depends="init,jar,-create-v12-manifest-xref-schema" |
| description="Add cross references to ODF 1.2 specification."> |
| <antcall target="-add-v12-part3-xref"> |
| <param name="target-file" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part3.target}.odt"/> |
| <param name="keep-anchors" value="false"/> |
| </antcall> |
| </target> |
| |
| <target name="-add-v12-part3-xref" depends="init,jar,-create-v12-manifest-xref-schema" |
| description="Add cross references to ODF 1.2 specification."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="xref-schema-file" location="${build.dir}/schema/flat/${opendocument.v12.manifest-schema.xref}"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${xref-schema-file}" targetfile="${target-file}"/> |
| </not> |
| </condition> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/create-embedded-xref.xsl" |
| in="${opendocument.v12.part3.spec-source}" |
| out="${target-file}" |
| force="${force}"> |
| <param name="xref-schema-file" expression="${xref-schema-file}"/> |
| <param name="add-xrefs" expression="true"/> |
| <param name="keep-anchors" expression="${keep-anchors}"/> |
| </odfxslt> |
| </target> |
| |
| <target name="check-v12-part1-xref" depends="init,jar" |
| description="Check cross references in ODF 1.2 part 1."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file-name" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part1.target}"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/check-xrefs.xsl" |
| in="${target-file-name}.odt" |
| outfile="${target-file-name}.log" |
| force="false"/> |
| </target> |
| |
| <target name="check-v12-part2-xref" depends="init,jar" |
| description="Check cross references to ODF 1.2 part 2."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file-name" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part2.target}"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/check-xrefs.xsl" |
| in="${target-file-name}.odt" |
| outfile="${target-file-name}.log" |
| force="false"/> |
| </target> |
| |
| <target name="check-v12-part3-xref" depends="init,jar" |
| description="Chack cross references to ODF 1.2 part 3."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="target-file-name" value="${dist.dir}/xref/OpenDocument-v1.2${opendocument.v12.part3.target}"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/check-xrefs.xsl" |
| in="${target-file-name}.odt" |
| outfile="${target-file-name}.log" |
| force="false"/> |
| </target> |
| |
| <target name="check-v12-part1-completeness" depends="init,-create-v12-xref-schema" |
| description="Check whether all elements and attributes of the ODF 1.2 schema appear in the ODF 1.2 part 1 specification document."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="xref-schema-file" location="${build.dir}/schema/flat/${opendocument.v12.schema.xref}"/> |
| <property name="check-log-file" location="${dist.dir}/OpenDocument-v1.2${opendocument.v12.part1.target}-check.log"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${xref-schema-file}" targetfile="${check-log-file}"/> |
| </not> |
| </condition> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/check-completeness.xsl" |
| in="${opendocument.v12.part1.spec-source}" |
| outfile="${check-log-file}" |
| force="${force}"> |
| <param name="xref-schema-file" expression="${xref-schema-file}"/> |
| <param name="attributes-heading-level" expression="1"/> |
| </odfxslt> |
| </target> |
| |
| <target name="check-v12-part3-completeness" depends="init,-create-v12-manifest-xref-schema" |
| description="Check whether all elements and attributes of the ODF 1.2 schema appear in the ODF 1.2 part 1 specification document."> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="xref-schema-file" location="${build.dir}/schema/flat/${opendocument.v12.manifest-schema.xref}"/> |
| <property name="check-log-file" location="${dist.dir}/OpenDocument-v1.2${opendocument.v12.part3.target}-check.log"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${xref-schema-file}" targetfile="${check-log-file}"/> |
| </not> |
| </condition> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/check-completeness.xsl" |
| in="${opendocument.v12.part3.spec-source}" |
| outfile="${check-log-file}" |
| force="${force}"> |
| <param name="xref-schema-file" expression="${xref-schema-file}"/> |
| <param name="attributes-heading" expression="Manifest Attributes"/> |
| <param name="attributes-heading-level" expression="2"/> |
| </odfxslt> |
| </target> |
| |
| <target name="create-v12-html-zip" depends="init" |
| description="Create XHTML versions of all ODF 1.2 parts and zip them."> |
| <antcall target="create-v12-part0-html"/> |
| <antcall target="create-v12-part1-html"/> |
| <antcall target="create-v12-part2-html"/> |
| <antcall target="create-v12-part3-html"/> |
| <zip destfile="${dist.dir}/OpenDocument-v1.2${opendocument.v12.part0.state.target}.html.zip"> |
| <zipfileset dir="${dist.dir}/html${opendocument.v12.part0.state.target}"/> |
| </zip> |
| </target> |
| |
| |
| <target name="create-v12-part0-html" depends="-create-v12-part0-html-properties,-create-v12-html" |
| description="Create XHTML version of ODF 1.2 part 0 specification."/> |
| |
| <target name="create-v12-part1-html" depends="-create-v12-part1-html-properties,-create-v12-html" |
| description="Create XHTML version of ODF 1.2 part 1 specification."/> |
| |
| <target name="create-v12-part2-html" depends="-create-v12-part2-html-properties,-create-v12-html" |
| description="Create XHTML version of ODF 1.2 part 2 specification."/> |
| |
| <target name="create-v12-part3-html" depends="-create-v12-part3-html-properties,-create-v12-html" |
| description="Create XHTML version of ODF 1.2 part 3 specification."/> |
| |
| <target name="-create-v12-part0-html-properties" depends="init"> |
| <property name="part" value=""/> |
| <property name="state.target" value="${opendocument.v12.part0.state.target}"/> |
| <property name="postprocess-style" value="${project.odfxsltrunner}/sample_xslt/adapt-html-hrefs.xsl"/> |
| </target> |
| |
| <target name="-create-v12-part1-html-properties" depends="init"> |
| <property name="part" value="-part1"/> |
| <property name="state.target" value="${opendocument.v12.part1.state.target}"/> |
| <property name="contains-math-objects" value="true"/> |
| </target> |
| |
| <target name="-create-v12-part2-html-properties" depends="init"> |
| <property name="part" value="-part2"/> |
| <property name="state.target" value="${opendocument.v12.part2.state.target}"/> |
| <property name="contains-math-objects" value="true"/> |
| </target> |
| |
| <target name="-create-v12-part3-html-properties" depends="init"> |
| <property name="part" value="-part3"/> |
| <property name="state.target" value="${opendocument.v12.part3.state.target}"/> |
| </target> |
| |
| <target name="-create-v12-html" depends="-create-v12-nomath,-create-v12-html-transform,-create-v12-html-postprocess,-create-v12-html-copy-images"/> |
| |
| <target name="-create-v12-html-transform" depends="init"> |
| <condition property="html-source" value="${dist.dir}/nomath/OpenDocument-v1.2${state.target}${part}-nomath.odt" else="${opendocument.v12.product.dir}/OpenDocument-v1.2${state.target}${part}.odt"> |
| <isset property="contains-math-objects"/> |
| </condition> |
| <condition property="html-target" value="${build.dir}/html${state.target}/OpenDocument-v1.2${state.target}${part}.html" else="${dist.dir}/html${state.target}/OpenDocument-v1.2${state.target}${part}.html"> |
| <isset property="postprocess-style"/> |
| </condition> |
| <dirname property="reference.odf2xhtml.xsl.dir2" file="${reference.odf2xhtml.xsl}"/> |
| <dirname property="reference.odf2xhtml.xsl.dir" file="${reference.odf2xhtml.xsl.dir2}"/> |
| <condition property="force"> |
| <not> |
| <uptodate targetfile="${html-target}"> |
| <srcfiles dir="${reference.odf2xhtml.xsl.dir}"> |
| <include name="**/*.xsl"/> |
| </srcfiles> |
| </uptodate> |
| </not> |
| </condition> |
| <taskdef name="odfxslt-saxon" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}:${reference.saxon.jar}"/> |
| <odfxslt-saxon style="${reference.odf2xhtml.xsl}" |
| in="${html-source}" |
| outfile="${html-target}" |
| force="${force}"> |
| <factory name="net.sf.saxon.TransformerFactoryImpl"/> |
| </odfxslt-saxon> |
| </target> |
| |
| <target name="-create-v12-html-postprocess" depends="init" if="postprocess-style"> |
| <xslt style="${postprocess-style}" |
| in="${build.dir}/html${state.target}/OpenDocument-v1.2${state.target}${part}.html" |
| out="${dist.dir}/html${state.target}/OpenDocument-v1.2${state.target}${part}.html" |
| force="false"> |
| <xmlcatalog> |
| <dtd |
| publicId="-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" |
| location="${project.odfxsltrunner}/sample_xslt/dummy.dtd"/> |
| </xmlcatalog> |
| </xslt> |
| </target> |
| |
| <target name="-create-v12-html-copy-images" depends="init"> |
| <property name="html-image-list" value="${build.dir}/OpenDocument-v1.2${state.target}${part}-image-list.txt"/> |
| <xslt in="${dist.dir}/html${state.target}/OpenDocument-v1.2${state.target}${part}.html" |
| out="${html-image-list}" |
| style="${project.odfxsltrunner}/sample_xslt/create-html-img-list.xsl"> |
| <xmlcatalog> |
| <dtd |
| publicId="-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" |
| location="${project.odfxsltrunner}/sample_xslt/dummy.dtd"/> |
| </xmlcatalog> |
| </xslt> |
| |
| <unzip src="${html-source}" dest="${dist.dir}/html${state.target}"> |
| <patternset includesfile="${html-image-list}"/> |
| </unzip> |
| </target> |
| |
| |
| <target name="create-v12-part1-nomath" depends="-create-v12-part1-html-properties,-create-v12-nomath" |
| description="Create a version of ODF 1.2 part 1 specification that does not contain MathML."/> |
| |
| <target name="create-v12-part2-nomath" depends="-create-v12-part2-html-properties,-create-v12-nomath" |
| description="Create a version of ODF 1.2 part 2 specification that does not contain MathML."/> |
| |
| |
| <target name="-create-v12-nomath" depends="jar,-create-v12-ooo-xhtml" if="contains-math-objects"> |
| <property name="target-file" value="${dist.dir}/nomath/OpenDocument-v1.2${state.target}${part}-nomath.odt"/> |
| <property name="image-list" value="${build.dir}/OpenDocument-v1.2${state.target}${part}-replace-mathml-image-list.txt"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${ooo-xhtml}" targetfile="${target-file}"/> |
| </not> |
| </condition> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/replace-objects.xsl" |
| in="${opendocument.v12.product.dir}/OpenDocument-v1.2${state.target}${part}.odt" |
| out="${target-file}" |
| force="${force}"> |
| <param name="ref-html" expression="${ooo-xhtml}"/> |
| </odfxslt> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/replace-objects-list.xsl" |
| in="${opendocument.v12.product.dir}/OpenDocument-v1.2${state.target}${part}.odt" |
| outfile="${image-list}" |
| force="${force}"> |
| <param name="ref-html" expression="${ooo-xhtml}"/> |
| </odfxslt> |
| <zip destfile="${target-file}" compress="false" update="true"> |
| <zipfileset dir="${ooo-html.dir}" includesfile="${image-list}" prefix="Pictures"/> |
| </zip> |
| </target> |
| |
| <target name="-create-v12-ooo-xhtml" depends="-create-v12-ooo-xhtml-check" if="ooo-xhtml.notuptodate"> |
| <!-- Create xhtml file from OOo HTML output file --> |
| <exec executable="${exec.xmllint}"> |
| <env key="PATH" path="${exec.xmllint.path}"/> |
| <arg value="--html"/> |
| <arg value="--xmlout"/> |
| <arg value="--dropdtd"/> |
| <arg value="-o"/> |
| <arg value="${ooo-xhtml}"/> |
| <arg value="${ooo-html}"/> |
| </exec> |
| </target> |
| |
| <target name="-create-v12-ooo-xhtml-check" depends="init" if="contains-math-objects"> |
| <property name="ooo-html.dir" location="${opendocument.v12.product.dir}/ooo-html${state.target}"/> |
| <property name="ooo-html" value="${ooo-html.dir}/OpenDocument-v1.2${state.target}${part}.html"/> |
| <property name="ooo-xhtml" location="${build.dir}/OpenDocument-v1.2${state.target}${part}-ooo.html"/> |
| <condition property="ooo-html.exists"> |
| <available file="${ooo-html}"/> |
| </condition> |
| <fail message="OOo HTML version ${ooo-html} does not exist" unless="ooo-html.exists"/> |
| <condition property="ooo-xhtml.notuptodate"> |
| <and> |
| <isset property="ooo-html.exists"/> |
| <not> |
| <uptodate srcfile="${ooo-html}" targetfile="${ooo-xhtml}"/> |
| </not> |
| </and> |
| </condition> |
| </target> |
| |
| |
| |
| <target name="add-v12-part-default-values" depends="init,-create-v12-xref-schema" |
| description="Add default value definoitions to ODF 1.2 part 1"> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <property name="xref-schema-file" location="${build.dir}/schema/flat/${opendocument.v12.schema.xref}"/> |
| <property name="target-file" value="${dist.dir}/default-values/OpenDocument-v1.2${opendocument.v12.part1.state.target}.odt"/> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${xref-schema-file}" targetfile="${target-file}"/> |
| </not> |
| </condition> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/add-default-values.xsl" |
| in="${opendocument.v12.part1.spec-source}" |
| out="${target-file}" |
| force="${force}"> |
| <param name="xref-schema-file" expression="${xref-schema-file}"/> |
| </odfxslt> |
| </target> |
| |
| <target name="create-v12-attribute-xref-ods" depends="init,jar,-create-v12-dtype-schema" |
| description="Create a spreadsheet listing ODF 1.2 part 1 attributes"> |
| <taskdef name="odfxslt" classname="org.odftoolkit.odfxsltrunnertask.ODFXSLTRunnerTask" classpath="${dist.jar}:${reference.odfxsltrunner.jar}"/> |
| <copy file="${project.odfxsltrunner}/misc/odf-attribute-xref.ods" todir="${dist.dir}/attr-xref"/> |
| <odfxslt style="${project.odfxsltrunner}/sample_xslt/create-attribute-xref.xsl" |
| infile="${build.dir}/schema/flat/${opendocument.v12.schema.dtype}" |
| out="${dist.dir}/attr-xref/odf-attribute-xref.ods" |
| template="true"/> |
| </target> |
| |
| <target name="-create-v12-xref-schema" depends="init"> |
| <xslt style="${project.odfxsltrunner}/sample_xslt/create-flat-schema.xsl" |
| in="${opendocument.v12.part1.schema.dir}/${opendocument.v12.schema}" |
| out="${build.dir}/schema/flat/${opendocument.v12.schema.xref}" |
| force="false"> |
| <param name="incl-conditions" expression="true"/> |
| <param name="incl-default-values" expression="true"/> |
| <param name="incl-types" expression="true"/> |
| <param name="incl-elements" expression="true"/> |
| </xslt> |
| </target> |
| |
| <target name="-create-v12-manifest-xref-schema" depends="init"> |
| <xslt style="${project.odfxsltrunner}/sample_xslt/create-flat-schema.xsl" |
| in="${opendocument.v12.part3.schema.dir}/${opendocument.v12.schema.manifest}" |
| out="${build.dir}/schema/flat/${opendocument.v12.manifest-schema.xref}" |
| force="false"> |
| <param name="incl-conditions" expression="true"/> |
| <param name="incl-default-values" expression="true"/> |
| <param name="incl-types" expression="true"/> |
| <param name="incl-elements" expression="true"/> |
| </xslt> |
| </target> |
| |
| <target name="-create-v12-dtype-schema" depends="init"> |
| <condition property="force"> |
| <not> |
| <uptodate srcfile="${opendocument.v12.part1.schema.dir}/${opendocument.v12.schema}" targetfile="${build.dir}/schema/flat/${opendocument.v12.schema.dtype}"/> |
| </not> |
| </condition> |
| <xslt style="${project.odfxsltrunner}/sample_xslt/create-flat-schema.xsl" |
| in="${opendocument.v12.part1.schema.dir}/${opendocument.v12.schema}" |
| out="${build.dir}/schema/flat/${opendocument.v12.schema.dtype}" |
| force="${force}"> |
| <param name="incl-conditions" expression="false"/> |
| <param name="incl-default-values" expression="true"/> |
| <param name="incl-types" expression="true"/> |
| <param name="incl-elements" expression="false"/> |
| </xslt> |
| </target> |
| |
| </project> |