Commit 6068cc42 authored by Stephan Kreutzer's avatar Stephan Kreutzer

Convert to Org-Mode.

parent 680b2cdb
......@@ -19,11 +19,7 @@ along with Activities. If not, see <http://www.gnu.org/licenses/>.
<activities xmlns="htx-scheme-id://org.groupware-systems.20190227T133048Z/activities#20190512T211200Z" xml:lang="en">
<activity status="active" priority="3">
<title>Activity Format</title>
<description>
<p>
A semantic format to make activities/progress transparent. In a first version, no creation or start timestamps are recorded, so no matter how long things took, only completion is tracked for small and big activities alike. No privisions (yet?) regarding filing future activities or archiving completed activities. The project repository can be found at <a href="https://gitlab.com/groupware-systems/activities/">https://gitlab.com/groupware-systems/activities/</a>, the project website is <a href="http://groupware-systems.org">groupware-systems.org</a>.
</p>
</description>
<description><p>A semantic format to make activities/progress transparent. In a first version, no creation or start timestamps are recorded, so no matter how long things took, only completion is tracked for small and big activities alike. No privisions (yet?) regarding filing future activities or archiving completed activities. The project repository can be found at <a href="https://gitlab.com/groupware-systems/activities/">https://gitlab.com/groupware-systems/activities/</a>, the project website is <a href="http://groupware-systems.org">groupware-systems.org</a>.</p></description>
<sub-activities>
<activity status="complete" completed="2019-05-12T21:12:00Z">
<title>Create an activity format and publish my activities</title>
......@@ -44,10 +40,6 @@ along with Activities. If not, see <http://www.gnu.org/licenses/>.
</activity>
<activity status="complete" completed="2019-05-18T23:13:00Z">
<title>Add archival of completed activities.</title>
<description>
<p>
activities-xhtml-1.xsl doesn’t display completed top-level activities any more, so another transformation + output file is needed to show these as some sort of archive.
</p>
</description>
<description><p>activities-xhtml-1.xsl doesn’t display completed top-level activities any more, so another transformation + output file is needed to show these as some sort of archive.</p></description>
</activity>
</activities>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2019 Stephan Kreutzer
This file is part of Activities.
Activities is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
Activities is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with Activities. If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="htx-scheme-id://org.groupware-systems.20190227T133048Z/activities#20190512T211200Z">
<!-- TODO: Beware of Org-Mode special characters! No escaping yet! -->
<xsl:output method="text" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates select="./src:activities/src:activity"/>
</xsl:template>
<xsl:template match="src:activity">
<xsl:for-each select="ancestor-or-self::src:activity">
<xsl:text>*</xsl:text>
</xsl:for-each>
<xsl:choose>
<xsl:when test="@status='complete'">
<xsl:text> DONE </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> TODO </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="./src:title"/>
<xsl:if test="@status='complete' and @completed">
<xsl:text>&#xA;</xsl:text>
<xsl:for-each select="ancestor-or-self::src:activity">
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> CLOSED: [</xsl:text>
<xsl:value-of select="@completed"/>
<xsl:text>]</xsl:text>
</xsl:if>
<xsl:if test="./src:description">
<xsl:text>&#xA;</xsl:text>
<xsl:for-each select="ancestor-or-self::src:activity">
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> </xsl:text>
<xsl:apply-templates select="./src:description"/>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:apply-templates select="./src:sub-activities/src:activity"/>
</xsl:template>
<xsl:template match="src:activity/src:title">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="src:activity/src:title//text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="src:activity/src:title//src:a">
<xsl:text>[[</xsl:text>
<xsl:value-of select="@href"/>
<xsl:text>][</xsl:text>
<xsl:apply-templates/>
<xsl:text>]]</xsl:text>
</xsl:template>
<xsl:template match="src:activity/src:title//src:a//text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="src:activity/src:description">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="src:activity/src:description//text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="src:activity/src:description//src:a">
<xsl:text>[[</xsl:text>
<xsl:value-of select="@href"/>
<xsl:text>][</xsl:text>
<xsl:apply-templates/>
<xsl:text>]]</xsl:text>
</xsl:template>
<xsl:template match="src:activity/src:description//src:a//text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
......@@ -24,4 +24,5 @@ along with xml_xslt_transformator_1. If not, see <http://www.gnu.org/licenses/>.
<!--job input-file="./activities_de.xml" entities-resolver-config-file="./digital_publishing_workflow_tools/xml_xslt_transformator/xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./activities-xhtml-1_de.xsl" output-file="./output/activities_de.xhtml"/>
<job input-file="./activities_de.xml" entities-resolver-config-file="./digital_publishing_workflow_tools/xml_xslt_transformator/xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./activities-now-1_de.xsl" output-file="./output/activities_now_de.xhtml"/>
<job input-file="./activities_de.xml" entities-resolver-config-file="./digital_publishing_workflow_tools/xml_xslt_transformator/xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./activities-completed-1_de.xsl" output-file="./output/activities_completed_de.xhtml"/-->
<job input-file="./activities.xml" entities-resolver-config-file="./digital_publishing_workflow_tools/xml_xslt_transformator/xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./activities_to_orgmode_1.xsl" output-file="./output/activities.org"/>
</xml-xslt-transformator-1-jobfile>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment