diff options
author | Stefan Rotsch <ritschie@cvs.gnome.org> | 2004-03-28 18:55:03 +0800 |
---|---|---|
committer | Stefan Rotsch <ritschie@src.gnome.org> | 2004-03-28 18:55:03 +0800 |
commit | 9fbeeb11841b48f0cbecac27631951a2f2f7cc61 (patch) | |
tree | 3263a8f333f3e732092003dc82549ba91d1bf55d | |
parent | d207cb82f1d61dc09701945bcbca26f07dfb76a3 (diff) | |
download | gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar.gz gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar.bz2 gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar.lz gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar.xz gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.tar.zst gsoc2013-epiphany-9fbeeb11841b48f0cbecac27631951a2f2f7cc61.zip |
moved to doc/plan/plan.xml Makefile for transforming plan.xml to html
2004-03-28 Stefan Rotsch <ritschie@cvs.gnome.org>
* doc/plan.xml: moved to doc/plan/plan.xml
* doc/plan/Makefile: Makefile for transforming plan.xml to html
using xsltproc and xmllint
* doc/plan/README: README containing some plan-related information
* doc/plan/ephyplan.dtd: DTD describing plan.xml's content
* doc/plan/plan.xml: formerly located at doc/plan.xml
* doc/plan/plan2table.xsl: XSLT stylesheet for plan.xml
-rw-r--r-- | doc/plan/Makefile | 14 | ||||
-rw-r--r-- | doc/plan/README | 36 | ||||
-rw-r--r-- | doc/plan/ephyplan.dtd | 13 | ||||
-rw-r--r-- | doc/plan/plan.xml (renamed from doc/plan.xml) | 1 | ||||
-rw-r--r-- | doc/plan/plan2table.xsl | 53 |
5 files changed, 117 insertions, 0 deletions
diff --git a/doc/plan/Makefile b/doc/plan/Makefile new file mode 100644 index 000000000..aa353ce82 --- /dev/null +++ b/doc/plan/Makefile @@ -0,0 +1,14 @@ +SRC = plan.xml +TARGET = plan.html +XSLT = plan2table.xsl + +all: validate transform + +transform: + xsltproc --output $(TARGET) $(XSLT) $(SRC) + +validate: + xmllint --noout --valid $(SRC) + +clean: + rm -f $(TARGET) diff --git a/doc/plan/README b/doc/plan/README new file mode 100644 index 000000000..c5a3d00ae --- /dev/null +++ b/doc/plan/README @@ -0,0 +1,36 @@ +Epiphany Plan README + + +ITEM STATUS INFORMATION +======================= + +Each <item> needs to have a status assigned; possible values are: + + orphan + pending + delayed + designed + implementing + completed + + +HTML TRANSFORMATION +=================== + +The XSLT stylesheet shipped with the plan, plan2table.xsl, will +transform the plan's XML into a nice HTML table by using: + + xsltproc -o plan.html plan2table.xsl plan.xml + + +VALIDATION +========== + +There's a DTD associated with the Epiphany plan, ephyplan.dtd. +To prevent typos, you could validate the plan before commiting changes +to CVS by using: + + xmllint --noout --valid plan.xml + +You could also simply run "make" in this directory, which will +validate the xml input file first, and then transform it to html. diff --git a/doc/plan/ephyplan.dtd b/doc/plan/ephyplan.dtd new file mode 100644 index 000000000..51ea07f29 --- /dev/null +++ b/doc/plan/ephyplan.dtd @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!ELEMENT plan (item*)> + +<!ELEMENT item (title,description,status,responsible)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT description (#PCDATA)> +<!ELEMENT status EMPTY> +<!ELEMENT responsible (#PCDATA)> + +<!ATTLIST plan version CDATA #REQUIRED> +<!ATTLIST status id (completed|delayed|designed|implementing|orphan|pending) #REQUIRED> +<!ATTLIST responsible email CDATA #REQUIRED> diff --git a/doc/plan.xml b/doc/plan/plan.xml index 798c96267..d4b522f69 100644 --- a/doc/plan.xml +++ b/doc/plan/plan.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plan SYSTEM "ephyplan.dtd"> <plan version="1.4">
<item>
<title>Transient/Modal Issues</title>
diff --git a/doc/plan/plan2table.xsl b/doc/plan/plan2table.xsl new file mode 100644 index 000000000..92fc30877 --- /dev/null +++ b/doc/plan/plan2table.xsl @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="xml" encoding="UTF-8" indent="yes" /> + +<xsl:template match="/plan"> + <html><head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <style type="text/css"> + table { background-color: #EEF; margin: 0 0.5em 1em 0.5em; } + .blank { padding: 0.5em 0; } + .title { background-color: #669; color: #FFF; font-size: 1.2em; font-weight: bold; padding: 0 0.25em; text-align: left; } + .description {background-color: #CAA; padding: 0.25em 0.5em; text-align: left; } + .responsible { white-space: nowrap; } + .status { padding: 0.25em 1em; text-align: center; } + .completed { background-color: #0F0; color: #FFF; } + .delayed { background-color: #909; color: #FFF; } + .designed { background-color: #F60; color: #FFF; } + .implementing { background-color: #FF0; color: #FFF; } + .orphan { background-color: #00F; color: #FFF; } + .pending { background-color: #F00; color: #FFF; } + </style> + </head><body> + <h1>Epiphany <xsl:value-of select="@version" /> Plan</h1> +<table> + <xsl:apply-templates select="item"> + <!-- Sort by status first, then sort by title (both alphabetically)--> + <xsl:sort select="status/@id" /> + <xsl:sort select="title" /> + </xsl:apply-templates> +</table> + </body></html> +</xsl:template> + +<xsl:template match="item"> + <tr> + <td class="title" colspan="2"><xsl:value-of select="title" /></td> + </tr> + <tr> + <td class="description"><xsl:value-of select="description" /> + <span class="responsible"> + <xsl:if test="normalize-space(responsible)"> + [<a href="mailto:{responsible/@email}"><xsl:value-of select="responsible" /></a>] + </xsl:if> + </span> + </td> + <td class="status"><span class="{status/@id}"><xsl:value-of select="status/@id" /></span></td> + </tr> + <tr> + <td class="blank" colspan="2"></td> + </tr> +</xsl:template> + +</xsl:stylesheet> |