# HG changeset patch # User František Kučera # Date 1578240157 -3600 # Node ID 8e2d9b67b51c6bef253bce78a7d9c1f7896a61c1 # Parent 094be1d761b11e29173f82375225c1918c9a8af3 xslt: a basic XSLT template for XHTML output + helper scripts diff -r 094be1d761b1 -r 8e2d9b67b51c xslt-examples/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt-examples/README.txt Sun Jan 05 17:02:37 2020 +0100 @@ -0,0 +1,3 @@ +This directory contains examples of XSLT templates for various formats and helper scripts. +Just create a XSLT and a symlink to the .sh script in order to create a new relpipe output filter. +These templates and scripts are not part of the stable public API. diff -r 094be1d761b1 -r 8e2d9b67b51c xslt-examples/__relpipe-out-xml_xslt.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt-examples/__relpipe-out-xml_xslt.sh Sun Jan 05 17:02:37 2020 +0100 @@ -0,0 +1,27 @@ +#!/bin/bash + +# Relational pipes +# Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +DIR="$(dirname $0)" +BASE="$(basename $0)" +XSL="$DIR/$BASE.xsl" + +if [[ -f "$XSL" ]]; then + relpipe-out-xml | xsltproc "$XSL" - +else + echo "unable to find XSLT template: $XSL" 1>&2 + exit 1; +fi diff -r 094be1d761b1 -r 8e2d9b67b51c xslt-examples/relpipe-out-xhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt-examples/relpipe-out-xhtml Sun Jan 05 17:02:37 2020 +0100 @@ -0,0 +1,1 @@ +__relpipe-out-xml_xslt.sh \ No newline at end of file diff -r 094be1d761b1 -r 8e2d9b67b51c xslt-examples/relpipe-out-xhtml.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xslt-examples/relpipe-out-xhtml.xsl Sun Jan 05 17:02:37 2020 +0100 @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + <xsl:value-of select="$title"/> + + + + + +

+ +

+ +

+ This is output of relpipe-out-xml converted to XHTML web page. +

+ + +

+ +

+ + + + + + + + + + + + + + + + + + + + +
+ + ( + + ) +
+ +
+ +
+ + + +
+ +
\ No newline at end of file