<?xml version="1.0" encoding="UTF-8"?><!-- | |
Copyright (c) 2011 Formal Mind GmbH and University of Dusseldorf. | |
All rights reserved. This program and the accompanying materials | |
are made available under the terms of the Eclipse Public License v1.0 | |
which accompanies this distribution, and is available at | |
http://www.eclipse.org/legal/epl-v10.html | |
Contributors: | |
Lukas Ladenberger - initial API and implementation | |
--> | |
<project name="org.eclipse.mylyn.wikitext.example" default="all"> | |
<description> | |
Generate Eclipse help content for the RMF user guide | |
</description> | |
<property name="help.doc.url.base" value="http://wiki.eclipse.org"/> | |
<property name="wiki.url.base" value="${help.doc.url.base}/RMF"/> | |
<property name="imageFolder" value="images"/> | |
<path id="wikitext.tasks.classpath"> | |
<fileset dir="lib"> | |
<include name="org.eclipse.mylyn.wikitext.*core*.jar"/> | |
</fileset> | |
</path> | |
<taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties"/> | |
<taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/> | |
<target name="init"> | |
<mkdir dir="tmp"/> | |
</target> | |
<target name="clean" depends="init"> | |
<delete includeemptydirs="true" failonerror="false"> | |
<fileset dir="tmp"/> | |
</delete> | |
</target> | |
<target name="all" depends="generate-help, test"/> | |
<target name="generate-help" depends="init" description="Generate Eclipse help content for the RMF user guide"> | |
<mediawiki-to-eclipse-help | |
wikiBaseUrl="${help.doc.url.base}" | |
validate="true" | |
failonvalidationerror="true" | |
prependImagePrefix="${imageFolder}" | |
formatoutput="true" | |
defaultAbsoluteLinkTarget="rmf_external" | |
dest="${basedir}" | |
title="RMF" | |
generateUnifiedToc="false"> | |
<path name="RMF/User_Guide/Tutorial" title="ProR Tutorial" generateToc="true"/> | |
<path name="RMF/User_Guide/Reference" title="ProR Reference" generateToc="true"/> | |
<path name="RMF/User_Guide/Presentations" title="ProR Presentations Plugins" generateToc="true"/> | |
<path name="RMF/FAQ" title="ProR FAQ" generateToc="true"/> | |
<path name="RMF/User_Guide/Glossary" title="ProR Glossary" generateToc="true"/> | |
<pageAppendum> | |
= Updating This Document = | |
This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit | |
{url} | |
</pageAppendum> | |
</mediawiki-to-eclipse-help> | |
</target> | |
<target name="test" depends="init" description="verify that all of the HTML files are well-formed XML"> | |
<echo level="info"> | |
Validating help content XML and HTML files: The Eclipse help system expects well-formed XML | |
If validation fails it is because either: | |
* the userguide source code is poorly formed, or | |
* the WikiText MediaWiki parser has a bug | |
Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source, | |
or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block) | |
</echo> | |
<!-- | |
Don't bother with DTD validation: we only care if the files are well-formed. | |
We therefore provide an empty DTD | |
--> | |
<mkdir dir="tmp"/> | |
<echo file="tmp/__empty.dtd" message=""/> | |
<xmlvalidate lenient="true"> | |
<fileset dir="RMF"> | |
<include name="**/*.xml"/> | |
</fileset> | |
<fileset dir="RMF"> | |
<include name="**/*.html"/> | |
</fileset> | |
<fileset dir="."> | |
<include name="*toc.xml"/> | |
</fileset> | |
<dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${basedir}/tmp/__empty.dtd"/> | |
</xmlvalidate> | |
</target> | |
</project> |