Browse Source

Merge pull request #514 from Yakindu/issue_513_docbook_cleanup

Issue 513 docbook cleanup
Thomas Kutz 9 years ago
parent
commit
1d414feb7b

+ 0 - 3
plugins/org.yakindu.sct.doc.user/.gitignore

@@ -1,7 +1,4 @@
 .ant-targets-build.xml
-docbook-xsl/
-docbook-xsl.distribution/
-docbook-xml.distribution/
 examples/
 help/
 html/

+ 0 - 1
plugins/org.yakindu.sct.doc.user/.project

@@ -3,7 +3,6 @@
 	<name>org.yakindu.sct.doc.user</name>
 	<comment></comment>
 	<projects>
-		<project>org.yakindu.sct.doc.docbook-xsl</project>
 	</projects>
 	<buildSpec>
 		<buildCommand>

+ 1 - 2
plugins/org.yakindu.sct.doc.user/build.properties

@@ -9,5 +9,4 @@ bin.includes = plugin.xml,\
                about.mappings,\
                about.properties,\
                Yakindu-about.png,\
-               css/,\
-               docbook-xsl.tmpl/
+               css/

+ 1 - 293
plugins/org.yakindu.sct.doc.user/build.xml

@@ -59,30 +59,10 @@
 
 
 
-    <!-- The DocBook XML distribution ZIP file will be unpacked to this directory: -->
-    <property name="docbook-xml.distribution.dir" location="${basedir}/docbook-xml.distribution" />
-
-    <!-- The DocBook XSL distribution ZIP file will be unpacked to this directory: -->
-    <property name="docbook-xsl.distribution.dir" location="${basedir}/docbook-xsl.distribution" />
-
-    <!-- This directory contains our project-specific DocBook XSL customization layer as templates with to-be-resolved
-         references to the unpacked DocBook XSL distribution: -->
-    <property name="docbook-xsl.dir.tmpl.name" value="docbook-xsl.tmpl" />
-    <property name="docbook-xsl.dir.tmpl" location="${basedir}/${docbook-xsl.dir.tmpl.name}" />
-
-    <!-- This directory contains our project-specific DocBook XSL customization layer with references being resolved to
-         point to the unpacked DocBook XSL distribution: -->
-    <property name="docbook-xsl.dir" location="${basedir}/docbook-xsl" />
-
-
-
     <!-- Remove generated stuff: -->
     <target name="clean">
         <delete includeemptydirs="true" failonerror="false">
             <fileset dir="${res.dir.name}" />
-            <fileset dir="${docbook-xsl.dir}" />
-            <fileset dir="${docbook-xsl.distribution.dir}" />
-            <fileset dir="${docbook-xml.distribution.dir}" />
             <fileset dir="${basedir}" defaultexcludes="false">
                 <include name="${help.dir.name}/**" />
                 <include name="${html.dir.name}/**" />
@@ -93,43 +73,6 @@
     </target>
 
 
-    <!-- Initializes the build environment. -->
-    <target name="init" depends="init.aether, init.dependencies" description="Initializes the build environment." />
-
-
-    <!-- Aether Ant Tasks are used to access Maven dependencies from an Ant build. It is initialized by downloading
-         the Aether Ant Tasks JAR to the library folder, if needed. The downloaded JAR will not be removed by the
-         "clean" target. If the JAR is present, a typedef will make Aether Ant Tasks' elements available in the Ant
-         build file. -->
-    <target name="init.aether"
-            description="Initializes Aether Ant Tasks JAR by downloading the JAR and defining a type.">
-        <condition property="target.exists">
-            <available file="${aether.jar.file}" />
-        </condition>
-        <sequential unless:set="target.exists">
-            <mkdir dir="${lib.dir}" />
-            <get src="${aether.jar.src}"
-                 dest="${aether.jar.file}"
-                 skipexisting="true"
-                 usetimestamp="true"
-                 verbose="true" />
-            <fail message="Checksum mismatch for ${aether.jar.file}. Please delete it and rerun ant to redownload.">
-                <condition>
-                    <not>
-                        <checksum file="${aether.jar.file}"
-                                  algorithm="SHA-512"
-                                  property="${aether.jar.checksum}"
-                                  verifyproperty="checksum.matches" />
-                    </not>
-                </condition>
-            </fail>
-        </sequential>
-        <path id="aether-ant-tasks.classpath" path="${aether.jar.file}" />
-        <typedef resource="org/eclipse/aether/ant/antlib.xml"
-                 uri="antlib:org.eclipse.aether.ant"
-                 classpathref="aether-ant-tasks.classpath" />
-    </target>
-
     <!-- Download and unpack the wikitext standalone distribution. Unfortunately it is currently available as a nightly build only. -->
     <target name="wikitext.download" description="Download and unpack the wikitext standalone distribution.">
         <condition property="wikitext.zip.file.exists">
@@ -168,165 +111,13 @@
         </path>
     </target>
 
-    <!-- Resolves the necessary dependencies: -->
-    <target name="init.dependencies" description="Resolves the necessary dependencies." depends="init.aether">
-
-        <!-- Classpath for Xalan, needed to render DocBook documents via XSLT. -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="xalan" artifactId="xalan" version="2.7.2" scope="compile" />
-            </artifact:dependencies>
-            <path refid="xalan.classpath" />
-        </artifact:resolve>
-
-        <!-- Classpath for Xerces and Xerces samples, needed for XInclude preprocessing. -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="xerces" artifactId="xercesImpl" version="2.11.0" scope="compile" />
-                <dependency groupId="xerces" artifactId="xercesSamples" version="2.8.0" scope="compile" />
-            </artifact:dependencies>
-            <path refid="xerces.classpath" />
-        </artifact:resolve>
-
-        <!-- Classpath for FOP, needed to render FOP files (generated by DocBook XSL) into PDF documents. -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="org.apache.xmlgraphics" artifactId="fop" version="2.1" scope="compile" />
-            </artifact:dependencies>
-            <path refid="fop.classpath" />
-        </artifact:resolve>
-
-        <!-- ZIP file containing the DocBook XSL distribution, needed to convert DocBook documents to anything else: -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="net.sf.docbook"
-                            artifactId="docbook-xsl"
-                            version="1.78.1"
-                            type="zip"
-                            classifier="ns-resources"
-                            scope="compile" />
-            </artifact:dependencies>
-            <properties prefix="docbook-xsl" />
-        </artifact:resolve>
-
-        <!-- DocBook XML -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="net.sf.docbook"
-                            artifactId="docbook-xml"
-                            version="5.0"
-                            type="zip"
-                            classifier="rng-resources"
-                            scope="compile" />
-            </artifact:dependencies>
-            <properties prefix="docbook-xml" />
-        </artifact:resolve>
-
-        <!-- Jing (used for Relax-NG validation) -->
-        <artifact:resolve>
-            <artifact:dependencies>
-                <dependency groupId="com.thaiopensource" artifactId="jing" version="20091111" scope="compile" />
-            </artifact:dependencies>
-            <path refid="jing.classpath" />
-        </artifact:resolve>
-
-    </target>
-
-
-    <!-- Initializes DocBook XML by unpacking the distribution ZIP file. -->
-    <target name="init.docbook-xml"
-            description="Initializes DocBook XML by unpacking the distribution ZIP file."
-            depends="init.dependencies">
-        <condition property="docbook-xml.dirstribution.dir.exists">
-            <available file="${docbook-xml.distribution.dir}" />
-        </condition>
-        <unzip dest="${docbook-xml.distribution.dir}"
-               src="${docbook-xml.net.sf.docbook:docbook-xml:zip:rng-resources}"
-               overwrite="false"
-               unless:set="docbook-xml.dirstribution.dir.exists" />
-    </target>
-
-
-    <!-- Initializes DocBook XSL by unpacking the distribution ZIP file and resolving the references in our
-         customization layer template files. -->
-    <target name="init.docbook-xsl"
-            description="Initializes DocBook XSL by unpacking the distribution ZIP file and resolving the references in our customization layer template files."
-            depends="init.dependencies">
-        <condition property="docbook-xsl.distribution.dir.exists">
-            <available file="${docbook-xsl.distribution.dir}" />
-        </condition>
-        <sequential unless:set="docbook-xsl.distribution.dir.exists">
-            <unzip dest="${docbook-xsl.distribution.dir}"
-                   src="${docbook-xsl.net.sf.docbook:docbook-xsl:zip:ns-resources}"
-                   overwrite="false" />
-        </sequential>
-        <mkdir dir="${docbook-xsl.dir}" />
-        <filter token="docbook-xsl" value="${docbook-xsl.distribution.dir}/docbook" />
-        <copy todir="${docbook-xsl.dir}" filtering="true">
-            <fileset dir="${docbook-xsl.dir.tmpl}" />
-        </copy>
-    </target>
-
-
-    <!-- Resolves XIncludes. -->
-    <target name="resolve-xinclude" depends="init">
-        <mkdir dir="${res.dir.name}" />
-        <java classname="sax.Writer"
-              classpathref="xerces.classpath"
-              output="${res.dir.name}/${res.basename}.xml"
-              logerror="true"
-              failonerror="true"
-              fork="true">
-            <arg value="-np" />
-            <arg value="-xi" />
-            <arg value="${src.dir}/${src.basename}.xml" />
-        </java>
-    </target>
-
-
-    <!-- Validates the DocBook source file against the DocBook 5.0 Relax-NG grammar. -->
-    <target name="validate" depends="init.docbook-xml, resolve-xinclude">
-        <java classname="com.thaiopensource.relaxng.util.Driver"
-              classpathref="jing.classpath"
-              fork="true"
-              failonerror="true">
-            <arg value="${docbook-xml.distribution.dir}/xsd/docbook.rng" />
-            <arg value="${res.dir.name}/${res.basename}.xml" />
-        </java>
-    </target>
-
-
     <!-- Generates the documentation in all supported formats. -->
     <target name="generate.all"
             description="Generates the documentation in all supported formats."
             depends="generate.eclipsehelp" />
 
 
-    <!-- Generates the documentation as HTML. -->
-    <target name="generate.html.from.docbook"
-            description="Generates the documentation as HTML."
-            depends="validate, init.docbook-xsl">
-        <docbook.conversion src.dir="${res.dir.name}"
-                            src.file.name="${res.basename}.xml"
-                            dst.dir="${html.dir.name}"
-                            dst.file.name="${src.basename}.html"
-                            style="${docbook-xsl.dir}/html.xsl" />
-    </target>
-
-
-    <!-- Generates the documentation as Eclipse help. This is essentially chunked HTML with a TOC file. -->
-    <target name="generate.eclipsehelp.from.docbook"
-            description="Generates the documentation as Eclipse help."
-            depends="validate, init.docbook-xsl">
-        <docbook.conversion src.dir="${res.dir.name}"
-                            src.file.name="${res.basename}.xml"
-                            dst.dir="${help.dir.name}"
-                            dst.file.name="${src.basename}.html"
-                            style="${docbook-xsl.dir}/eclipsehelp.xsl" />
-    </target>
-
-
-    <!-- Generates the documentation as Eclipse help. This is essentially chunked HTML with a TOC file. -->
+    <!-- Generates the documentation as Eclipse help. -->
     <target name="generate.eclipsehelp"
             description="Generates the documentation as Eclipse help from the textile (wikitext) sources."
             depends="init.wikitext">
@@ -338,23 +129,6 @@
     </target>
 
 
-    <!-- Generates the documentation as PDF. -->
-    <target name="generate.pdf.from.docbook"
-            description="Generates the documentation as PDF."
-            depends="validate, init.docbook-xsl">
-        <docbook.conversion src.dir="${res.dir.name}"
-                            src.file.name="${res.basename}.xml"
-                            dst.dir="${pdf.dir.name}"
-                            dst.file.name="${src.basename}.fo"
-                            style="${docbook-xsl.dir}/pdf.xsl" />
-        <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="fop.classpath" />
-        <fop fofile="${pdf.dir}/${src.basename}.fo"
-             outfile="${pdf.dir}/${src.basename}.pdf"
-             format="application/pdf"
-             basedir="${pdf.dir}" />
-    </target>
-
-
 
     <!-- Converts a Textile document into Eclipsehelp format. Produces an HTML document and a corresponding toc.xml -->
     <macrodef name="wikitext.conversion"
@@ -410,70 +184,4 @@
         </sequential>
     </macrodef>
 
-    <!-- Converts a DocBook document into a target format. -->
-    <macrodef name="docbook.conversion" description="Converts a DocBook document into a target format.">
-        <attribute name="src.dir" />
-        <attribute name="src.file.name" />
-        <attribute name="dst.dir" />
-        <attribute name="dst.file.name" />
-        <attribute name="style" />
-
-        <sequential>
-            <local name="src.file" />
-            <local name="dst.file" />
-            <local name="dst.dirname" />
-            <local name="dst.subdir" />
-            <local name="subdir.exists" />
-            <property name="src.file" value="@{src.dir}/@{src.file.name}" />
-            <property name="dst.file" value="@{dst.dir}/@{dst.file.name}" />
-            <basename property="dst.dirname" file="@{dst.dir}" />
-
-            <!-- Convert DocBook sources to target format: -->
-            <mkdir dir="@{dst.dir}" />
-            <java classname="org.apache.xalan.xslt.Process" classpathref="xalan.classpath" fork="true">
-                <sysproperty key="java.endorsed.dirs" value="${lib.dir}" />
-                <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
-                             value="org.apache.xerces.parsers.XIncludeParserConfiguration" />
-                <arg value="-out" />
-                <arg value="${dst.file}" />
-                <arg value="-in" />
-                <arg value="${src.file}" />
-                <arg value="-xsl" />
-                <arg value="@{style}" />
-            </java>
-
-            <!-- In the special case "eclipsehelp", HTML files have been generated one level too deep, so let's move them up: -->
-            <sequential>
-                <property name="dst.subdir" value="@{dst.dir}/${dst.dirname}" />
-                <condition property="subdir.exists">
-                    <available file="${dst.subdir}" />
-                </condition>
-                <sequential if:set="subdir.exists">
-                    <mkdir dir="${dst.subdir}" />
-                    <move todir="@{dst.dir}">
-                        <fileset dir="${dst.subdir}">
-                            <include name="*" />
-                        </fileset>
-                    </move>
-                    <delete dir="${dst.subdir}" />
-                </sequential>
-            </sequential>
-
-            <!-- Copy the CSS files to the destination directory: -->
-            <copy todir="@{dst.dir}/${css.dir.name}">
-                <fileset dir="${css.dir}">
-                    <include name="*" />
-                </fileset>
-            </copy>
-
-            <!-- Copy the image files to the destination directory: -->
-            <copy todir="@{dst.dir}/${img.dir.name}">
-                <fileset dir="${img.dir}">
-                    <include name="*" />
-                </fileset>
-            </copy>
-
-        </sequential>
-    </macrodef>
-
 </project>

+ 0 - 17
plugins/org.yakindu.sct.doc.user/docbook-xsl.tmpl/common-html-rules.xsl

@@ -1,17 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:template match="informaltable[@role]">
-  <xsl:value-of select="@role" />
- </xsl:template>
-
-
- <xsl:template match="sect3">
- </xsl:template>
-
-
- <xsl:template match="application[child::text() = 'YAKINDU Statechart Tools']" mode="class.value">
-  <xsl:value-of select="'application-ysct'" />
- </xsl:template>
-
-</xsl:stylesheet>

+ 0 - 35
plugins/org.yakindu.sct.doc.user/docbook-xsl.tmpl/common-params.xsl

@@ -1,35 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <!-- Don't have DocBook XSL render navigation links. -->
- <xsl:param name="suppress.navigation">1</xsl:param>
-
- <!-- This CSS stylesheet is to be referenced from generated HTML files. -->
- <xsl:param name="html.stylesheet">css/style.css</xsl:param>
-
- <!-- Enables section numbering. -->
- <xsl:param name="section.autolabel">1</xsl:param>
-
- <!-- Specifies the maximum depth of section numbers. -->
- <xsl:param name="section.autolabel.max.depth">4</xsl:param>
-
- <!-- Don't render <remark> elements. -->
- <xsl:param name="show.comments" select="0"></xsl:param>
-
- <!-- Specifies the maximum depth of the section hierarchy to be included in the TOC. -->
- <xsl:param name="toc.section.depth">10</xsl:param>
- 
- <!-- Image URLs should be interpreted as being relative to the xml:base. -->
- <xsl:param name="keep.relative.image.uris">0</xsl:param>
-
- <!--  Specifies where a title is to be placed relative to the object it describes. -->
- <xsl:param name="formal.title.placement">
-  figure after
-  example before
-  equation before
-  table before
-  procedure before
-  task before
- </xsl:param>
-
-</xsl:stylesheet>

+ 0 - 25
plugins/org.yakindu.sct.doc.user/docbook-xsl.tmpl/eclipsehelp.xsl

@@ -1,25 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:import href="@docbook-xsl@/eclipse/eclipse.xsl"/>
-
-
- <xsl:import href="common-params.xsl"/>
- <xsl:import href="common-html-rules.xsl"/>
-
- <xsl:param name="base.dir">help</xsl:param>
- <xsl:param name="chunked.filename.prefix">documentation-</xsl:param>
- <xsl:param name="manifest">0</xsl:param>
- <xsl:param name="create.plugin.xml">0</xsl:param>
-
-
-
- <xsl:template match="*[contains(@role, 'stext_') or contains(@role, 'sgen_') ]">
-  <xsl:variable name="start_marker"><xsl:text> Start </xsl:text><xsl:value-of select="@role"/><xsl:text> </xsl:text></xsl:variable>
-  <xsl:variable name="end_marker"><xsl:text> End </xsl:text><xsl:value-of select="@role"/><xsl:text> </xsl:text></xsl:variable>
-  <xsl:comment><xsl:value-of select="$start_marker"/></xsl:comment>
-  <xsl:apply-imports/>
-  <xsl:comment><xsl:value-of select="$end_marker"/></xsl:comment>
- </xsl:template>
-
-</xsl:stylesheet>

+ 0 - 26
plugins/org.yakindu.sct.doc.user/docbook-xsl.tmpl/html.xsl

@@ -1,26 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" version="1.0">
-
- <xsl:import href="@docbook-xsl@/html/docbook.xsl"/>
-
-
- <xsl:import href="common-params.xsl"/>
- <xsl:import href="common-html-rules.xsl"/>
-
-
- <xsl:param name="base.dir">html</xsl:param>
- 
- <xsl:template name="user.header.content">
-  <p style="background-color: #95c0f3; text-align: right; font-weight: bold">YAKINDU Statechart Tools</p>
-</xsl:template>
-
- <xsl:template name="user.footer.content">
-  <p style="background-color: #95c0f3; text-align: right; font-weight: bold">YAKINDU Statechart Tools</p>
-</xsl:template>
-
-<xsl:template
- match="d:section[@role = 'to-be-written'] | d:sect1[@role = 'to-be-written'] | d:sect2[@role = 'to-be-written'] | d:sect3[@role = 'to-be-written'] | d:sect4[@role = 'to-be-written'] | d:sect5[@role = 'to-be-written']">
- <xsl:text><!-- The section missing here will be provided later. --></xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>

+ 0 - 14
plugins/org.yakindu.sct.doc.user/docbook-xsl.tmpl/pdf.xsl

@@ -1,14 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:import href="@docbook-xsl@/fo/docbook.xsl"/>
-
-
- <xsl:import href="common-params.xsl"/>
-
- <xsl:param name="base.dir">pdf</xsl:param>
- <xsl:param name="paper.type">A4</xsl:param>
- <xsl:param name="body.font.family">Sans-Serif, Helvetica</xsl:param>
- <xsl:param name="fop.extensions">0</xsl:param>
-
-</xsl:stylesheet>

File diff suppressed because it is too large
+ 92 - 86
plugins/org.yakindu.sct.doc.user/src/documentation.textile


File diff suppressed because it is too large
+ 0 - 6529
plugins/org.yakindu.sct.doc.user/src/documentation.xml


BIN
plugins/org.yakindu.sct.doc.user/src/images/callhandling_example_final.png


BIN
plugins/org.yakindu.sct.doc.user/src/images/callhandling_example_finished.png


BIN
plugins/org.yakindu.sct.doc.user/src/images/light_switch_310_statechart_simulator_state_off.png


File diff suppressed because it is too large
+ 0 - 13
plugins/org.yakindu.sct.doc.user/src/warning_sctypesh.xml


BIN
plugins/org.yakindu.sct.doc.user/structure.odg