Commit | Line | Data |
---|---|---|
70f06a6f | 1 | <?xml version="1.0" encoding="UTF-8"?> |
12bf6834 FC |
2 | <project name="org.eclipse.linuxtools.lttng.help" default="all"> |
3 | <description> | |
4 | Generate Eclipse help content for the Linux Tools LTTng user guide | |
5 | </description> | |
6 | ||
7 | <!-- Set correct values --> | |
8 | <property name="help.doc.url.base" value="http://wiki.eclipse.org" /> | |
6dc1ef9f | 9 | <property name="ug.path" value="Linux_Tools_Project/LTTng2/User_Guide" /> |
12bf6834 FC |
10 | <property name="ug.title" value="LTTng Plug-in User Guide" /> |
11 | ||
12 | <!-- Replace dir with the dir you have eclipse installed into.--> | |
cfbde3ef | 13 | <property name="eclipse.dir" value="/home/francois/Eclipse/Indigo" /> |
12bf6834 FC |
14 | <property name="temp.dir" value="/home/francois/tmp" /> |
15 | ||
16 | <path id="wikitext.tasks.classpath"> | |
17 | <fileset dir="${eclipse.dir}/plugins"> | |
18 | <include name="org.eclipse.mylyn.wikitext.*core*.jar" /> | |
19 | </fileset> | |
20 | </path> | |
21 | ||
22 | <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties" /> | |
23 | <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" /> | |
24 | ||
25 | <target name="all" description="Generate Eclipse help content for the Linux Tools LTTng User Guide"> | |
26 | <mediawiki-to-eclipse-help wikiBaseUrl="${help.doc.url.base}" title="${ug.title}" formatoutput="true" dest="." templateExcludes="*eclipseproject*"> | |
27 | <path name="${ug.path}" title="${ug.title}" generateToc="false" /> | |
28 | <stylesheet url="book.css" /> | |
29 | <pageAppendum> | |
30 | = Updating This Document = | |
31 | ||
32 | This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit | |
6dc1ef9f | 33 | http://wiki.eclipse.org/Linux_Tools_Project/LTTng2/User_Guide. |
12bf6834 FC |
34 | </pageAppendum> |
35 | </mediawiki-to-eclipse-help> | |
36 | <antcall target="test" /> | |
37 | </target> | |
38 | ||
39 | <target name="test" description="Verify that all of the HTML files are well-formed XML"> | |
40 | <echo level="info"> | |
41 | Validating help content XML and HTML files: The Eclipse help system expects well-formed XML | |
42 | ||
43 | If validation fails it is because either: | |
44 | ||
45 | * the userguide source code is poorly formed, or | |
46 | * the WikiText MediaWiki parser has a bug | |
47 | ||
48 | Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source, | |
49 | or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block) | |
50 | </echo> | |
51 | ||
52 | <!-- | |
53 | Don't bother with DTD validation: we only care if the files are well-formed. | |
54 | We therefore provide an empty DTD | |
55 | --> | |
56 | <echo file="${temp.dir}/__empty.dtd" message="" /> | |
57 | <xmlvalidate lenient="true"> | |
58 | <fileset dir="Linux_Tools_Project"> | |
59 | <include name="**/*.html" /> | |
60 | </fileset> | |
61 | <dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${temp.dir}/__empty.dtd" /> | |
62 | </xmlvalidate> | |
63 | <delete file="${temp.dir}/__empty.dtd" /> | |
64 | </target> | |
65 | </project> |