source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/webhelp/build.xml@ 15c7d39

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 15c7d39 was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 7.6 KB
Line 
1<project default="help" name="mainbuild">
2
3 <dirname property="ant.file.dir" file="${ant.file.mainbuild}"/>
4 <loadproperties srcFile="${ant.file.dir}/build.properties"/>
5 <property name="webhelp.include.search.tab" value="true"/>
6
7 <property name="extensions.dir" value="${ant.file.dir}/../extensions"/>
8
9 <path id="classpath">
10 <pathelement location="${extensions.dir}/webhelpindexer.jar"/>
11 <pathelement location="${extensions.dir}/lucene-analyzers-3.0.0.jar"/>
12 <pathelement location="${extensions.dir}/lucene-core-3.0.0.jar"/>
13 <pathelement location="${extensions.dir}/tagsoup-1.2.1.jar"/>
14 </path>
15
16 <condition property="perform-validation-dtd">
17 <equals arg1="${validate-against-dtd}" arg2="true"/>
18 </condition>
19 <condition property="do-search-indexing">
20 <equals arg1="${webhelp.include.search.tab}" arg2="true"/>
21 </condition>
22
23 <target name="validate" if="perform-validation-dtd">
24 <xmlvalidate file="${input-xml}" classname="org.apache.xerces.parsers.SAXParser"/>
25 </target>
26
27 <target name="chunk" depends="clean">
28
29 <mkdir dir="${output-dir}"/>
30 <tempfile destdir="${output-dir}" deleteonexit="true" property="xincluded-profiled.xml"/>
31 <tempfile destdir="${output-dir}" deleteonexit="true" property="dummy.html"/>
32 <xslt
33 in="${input-xml}"
34 out="${xincluded-profiled.xml}"
35 style="${ant.file.dir}/../profiling/profile.xsl"
36 classpath="${xercesImpl.jar}">
37 <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
38 value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
39 <param name="profile.arch" expression="${profile.arch}" if="profile.arch"/>
40 <param name="profile.audience" expression="${profile.audience}" if="profile.audience"/>
41 <param name="profile.condition" expression="${profile.condition}" if="profile.condition"/>
42 <param name="profile.conformance" expression="${profile.conformance}" if="profile.conformance"/>
43 <param name="profile.lang" expression="${profile.lang}" if="profile.lang"/>
44 <param name="profile.os" expression="${profile.os}" if="profile.os"/>
45 <param name="profile.revision" expression="${profile.revision}" if="profile.revision"/>
46 <param name="profile.revisionflag" expression="${profile.revisionflag}" if="profile.revisionflag"/>
47 <param name="profile.role" expression="${profile.role}" if="profile.role"/>
48 <param name="profile.security" expression="${profile.security}" if="profile.security"/>
49 <param name="profile.status" expression="${profile.status}" if="profile.status"/>
50 <param name="profile.userlevel" expression="${profile.userlevel}" if="profile.userlevel"/>
51 <param name="profile.vendor" expression="${profile.vendor}" if="profile.vendor"/>
52 <param name="profile.wordsize" expression="${profile.wordsize}" if="profile.wordsize"/>
53 <param name="profile.attribute" expression="${profile.attribute}" if="profile.attribute"/>
54 <param name="profile.value" expression="${profile.value}" if="profile.value"/>
55 </xslt>
56
57 <xslt
58 in="${xincluded-profiled.xml}"
59 out="${dummy.html}"
60 style="${stylesheet-path}"
61 scanincludeddirectories="false"
62 classpath="${xslt-processor-classpath}">
63 <param name="webhelp.include.search.tab" expression="${webhelp.include.search.tab}"
64 if="webhelp.include.search.tab"/>
65 <param name="output_file_name" expression="${output_file_name}"/>
66 <param name="webhelp.base.dir" expression="${output-dir}" if="output-dir"/>
67 <param name="webhelp.indexer.language" expression="${webhelp.indexer.language}" if="webhelp.indexer.language"/>
68 <param name="branding" expression="${branding}" if="branding"/>
69 <param name="brandname" expression="${brandname}" if="brandname"/>
70 <param name="admon.graphics" expression="${admon.graphics}" if="admon.graphics"/>
71 <param name="suppress.footer.navigation" expression="${suppress.footer.navigation}" if="suppress.footer.navigation"/>
72 </xslt>
73
74 <!-- Copy common content such as js files of tree, css etc. to template folder. They will be copied to doc folder. They are NOT page specific! -->
75 <copy todir="${output-dir}">
76 <fileset dir="${ant.file.dir}/template">
77 <include name="**/*"/>
78 <exclude name="**/search/**"/>
79 </fileset>
80 </copy>
81
82 <!-- Very simple-minded copy to handle the source document's images -->
83 <!-- TODO: Look at html help code that produces a manifest file...list of images -->
84 <!-- Customize webhelp.xsl to produce ant file to copy images actually used? -->
85 <dirname property="input-images-basedir" file="${input-xml}"/>
86 <copy todir="${output-dir}" failonerror="false">
87 <fileset dir="${input-images-basedir}" includes="${input-images-dirs}" />
88 </copy>
89 </target>
90
91 <target name="index" if="do-search-indexing">
92
93 <copy todir="${output-dir}/search">
94 <fileset dir="${ant.file.dir}/template/search">
95 <include name="**/*"/>
96 <exclude name="**/*.props"/>
97 <exclude name="**/stemmers/*"/>
98 </fileset>
99 </copy>
100
101 <!-- We separate this out so we only copy the stopwords list and stemmer for the indexer language -->
102 <copy todir="${output-dir}/search">
103 <fileset dir="${ant.file.dir}/template/search">
104 <include name="**/default.props"/>
105 <include name="**/punctuation.props"/>
106 <include name="**/${webhelp.indexer.language}*.props"/>
107 <include name="**/stemmers/${webhelp.indexer.language}_stemmer.js"/>
108 </fileset>
109 </copy>
110
111 <echo>Indexing html files in ${output-dir}</echo>
112
113 <java classname="com.nexwave.nquindexer.IndexerMain" fork="true">
114 <sysproperty key="htmlDir" value="${output-dir}"/>
115 <sysproperty key="indexerLanguage" value="${webhelp.indexer.language}"/>
116 <sysproperty key="htmlExtension" value="${html.extension}"/>
117 <sysproperty key="doStem" value="${enable.stemming}"/>
118 <sysproperty key="tocFile" value="${toc.file}"/>
119 <sysproperty key="indexerExcludedFiles" value="${indexer-excluded-files}"/>
120
121 <!--TagSoup SAX Parser for parsing even the bad html contents. see
122 http://sourceforge.net/tracker/?func=detail&aid=3401185&group_id=21935&atid=373750-->
123 <sysproperty key="org.xml.sax.driver" value="org.ccil.cowan.tagsoup.Parser"/>
124 <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl"/>
125
126 <!-- Uncomment the following if Xerces is your preference as the SAX XML Parser. Note that the indexing will fail with Xerces
127 if the html files are not XML-conformance -->
128 <!--sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>
129 <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/-->
130
131 <!-- Debug the indexer on port 5005 via remote-debug -->
132 <!--jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/-->
133 <classpath>
134 <path refid="classpath"/>
135 <pathelement location="${xercesImpl.jar}"/>
136 <pathelement location="${xml-apis.jar}"/>
137 <!-- <pathelement location="/usr/share/java/xercesImpl.jar"/> -->
138 <!-- <pathelement location="/usr/share/java/xml-apis.jar"/> -->
139 <!-- Gentoo Linux friendly default classpath-->
140 <pathelement location="/usr/share/xerces-2/lib/xercesImpl.jar"/>
141 <pathelement location="/usr/share/xml-commons/lib/xml-apis.jar"/>
142 </classpath>
143 </java>
144
145 <delete>
146 <fileset dir="${output-dir}/search" includes="*.props"/>
147 </delete>
148
149 </target>
150
151 <target name="webhelp" depends="validate,chunk,index"/>
152
153
154 <target name="clean">
155 <delete dir="${output-dir}"/>
156 </target>
157
158 <target name="help">
159 <echo>
160Usage:
161webhelp: Generates the document in webhelp format and indexes the content.
162clean: Deletes webhelp output directory.
163index: Indexes the content.
164 </echo>
165 </target>
166
167</project>
Note: See TracBrowser for help on using the repository browser.