From 22ed1ee6e63a496f1e56d8bd905542035d88ca2b Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 12 Oct 2014 12:57:01 +0200 Subject: Extracted generation framework into StaticXSLT module * i.e. the `detail` transformations were moved into a BuildXSLT module * modified XML Makefile accordingly * removed framework documentation from `README.md` and added usage documentation * this was done to make it easier to use the basic static site generation framework in other projects ** the detail transformations were developed to enable the implementation of this blog but are generic enough to be used in other contexts --- README.md | 20 ++--- detail/list.xsl | 49 ---------- detail/plan.xsl | 99 -------------------- detail/process.xsl | 250 --------------------------------------------------- detail/summarize.xsl | 75 ---------------- make.xml | 9 +- 6 files changed, 8 insertions(+), 494 deletions(-) delete mode 100644 detail/list.xsl delete mode 100644 detail/plan.xsl delete mode 100644 detail/process.xsl delete mode 100644 detail/summarize.xsl diff --git a/README.md b/README.md index 236ade5..8f83558 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ # blog.kummerlaender.eu -This repository contains a implementation of my existing [Symphony CMS based blog](https://github.com/KnairdA/symphony_blog) using static site generation in XSLT enabled by [InputXSLT](https://github.com/KnairdA/InputXSLT) and [BuildXSLT](https://github.com/KnairdA/BuildXSLT). +This repository contains a implementation of my existing [Symphony CMS based blog](https://github.com/KnairdA/symphony_blog) using static site generation in XSLT enabled by [InputXSLT](https://github.com/KnairdA/InputXSLT) and [BuildXSLT](https://github.com/KnairdA/BuildXSLT) using the [StaticXSLT](https://github.com/KnairdA/StaticXSLT) module. -## Overview: +## Usage: -The `detail` directory contains a chain of transformations which are processed by the build system as specified in `make.xml`. +The `make.xml` file contains the build instructions to be processed by [BuildXSLT](https://github.com/KnairdA/BuildXSLT) which may be executed as follows: -The first of these transformations `list.xsl` traverses and lists the `source` directory as a base for all further processing. This `source` directory contains four so called _levels_ which depict the different stages of the static generation process. - -Based on the results of the `list.xsl` transformation the next transformation `plan.xsl` schedules a number of different tasks to be processed by `process.xsl`. Examples for these tasks are cleaning the `target` directory, linking files and folders and of course generating transformation stylesheets contained within the various levels of the `source` tree. - -After the various tasks are processed by `process.xsl` the results of all tasks are summarized by `summarize.xsl` to provide the user with a easy to read plain-text output. +``` +ixslt --input make.xml --transformation ../BuildXSLT/build.xsl --include ../StaticXSLT +``` ## Levels: @@ -21,9 +19,3 @@ The second level `01_data` reads the contents of the `00_content` level and gene The third level `02_meta` further augments and groups these data sources. For example articles are grouped by year, tags and categories are resolved and augmented with article data provided by the previous level and articles are paginated in preparation for generating the primary article stream. Last but not least the fourth level `99_content` takes all the data sources generated in lower levels and generates the actual website pages. - -## Data Source and target resolution: - -Every transformation contained in one of the levels contains a `meta` variable defining the required data sources and target paths. This information is read during task processing by the `process.xsl` transformation and used to provide each transformation with the data sources it requires and write the output to the path it desires. This definition of requirements and targets directly inside each transformation is an essential part of how this static site generation concept works. - -The system currently provides a couple of different data source reading modes such as `full` for reading a complete XML file as input, `iterate` for iterating the second-level elements of a given XML source and `expression` for evaluating a arbitrary XPath expression against a given XML file. Target modes include `plain` for writing a the result into a given file at the appropriate target level and `xpath` for evaluating a XPath expression to generate the target path. This XPath evaluation functionality in combination with the `iterate` data source mode is especially helpful in situations where one wants to generate multiple output files from a single transformation such as when generating article pages or the pages of the article stream. diff --git a/detail/list.xsl b/detail/list.xsl deleted file mode 100644 index c70a6bf..0000000 --- a/detail/list.xsl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/detail/plan.xsl b/detail/plan.xsl deleted file mode 100644 index 653a9ca..0000000 --- a/detail/plan.xsl +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/detail/process.xsl b/detail/process.xsl deleted file mode 100644 index 7b596b6..0000000 --- a/detail/process.xsl +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - success - - - error - - - - - - - - - - - - - - - - - - - - - diff --git a/detail/summarize.xsl b/detail/summarize.xsl deleted file mode 100644 index 0399507..0000000 --- a/detail/summarize.xsl +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Error # - - : - - - - - Generation of " - - " failed. - - - - - - - - - Link from " - - " to " - - " failed. - - - Cleaning of " - - " failed. - - - - - - - - - - - - Tasks processed: - - - Tasks successful: - - - - ▶ Generation - - - successful - - - failed - - - . - - - - - diff --git a/make.xml b/make.xml index 177189b..89637dc 100644 --- a/make.xml +++ b/make.xml @@ -1,4 +1,4 @@ - + @@ -7,10 +7,5 @@ - - detail/list.xsl - detail/plan.xsl - detail/process.xsl - detail/summarize.xsl - + [StaticXSLT.xml] -- cgit v1.2.3