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