From ec8b85e24cd1a9c2258993b8a75ac0d8b14e5bd3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 5 Oct 2010 15:18:38 -0400 Subject: [PATCH] Added XSLT post. --- Makefile | 2 +- posts/XSLT.mdwn | 21 +++++++++++ posts/XSLT/chapter.mdwn | 1 + posts/XSLT/chapter/Makefile | 9 +++++ posts/XSLT/chapter/README | 5 +++ posts/XSLT/chapter/chapter.xml | 6 +++ posts/XSLT/chapter/style.xsl | 29 +++++++++++++++ posts/XSLT/code.mdwn | 1 + posts/XSLT/code/Makefile | 9 +++++ posts/XSLT/code/code.xsl | 67 ++++++++++++++++++++++++++++++++++ posts/XSLT/code/index.xml | 36 ++++++++++++++++++ 11 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 posts/XSLT.mdwn create mode 100644 posts/XSLT/chapter.mdwn create mode 100644 posts/XSLT/chapter/Makefile create mode 100644 posts/XSLT/chapter/README create mode 100644 posts/XSLT/chapter/chapter.xml create mode 100644 posts/XSLT/chapter/style.xsl create mode 100644 posts/XSLT/code.mdwn create mode 100644 posts/XSLT/code/Makefile create mode 100644 posts/XSLT/code/code.xsl create mode 100644 posts/XSLT/code/index.xml diff --git a/Makefile b/Makefile index aca3484..d79c957 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Build everything necessary to compile the wiki. -SUBDIRS = posts/yacc2dot +SUBDIRS = posts/yacc2dot posts/XSLT/chapter posts/XSLT/code TARGETS = all clean all : diff --git a/posts/XSLT.mdwn b/posts/XSLT.mdwn new file mode 100644 index 0000000..512c744 --- /dev/null +++ b/posts/XSLT.mdwn @@ -0,0 +1,21 @@ +[[!meta title="eXtensible Style Language Transforms"]] + +Often data is stored in +XML files must be +massaged into other formats (e.g. [[DocBook to roff|DocBook 5]]). +There are well developed procedures for defining such transformations +([XSLT][]) and a number of tools to apply them (e.g. [xsltproc][]). + +Besides the [W3 tutorial][w3], there is also a nice +[introduction][intro] by Paul Grosso and Norman Walsh. I've copied a +simple [[example|chapter]] from this intro and also included a +[[slightly more complicated setup|code]] for generating online help +for a list of macros. + +[XSLT]: http://www.w3.org/TR/xslt +[w3]: http://www.w3schools.com/xsl/ +[intro]: http://nwalsh.com/docs/tutorials/xsl/xsl/slides.html +[xsltproc]: http://www.xmlsoft.org/XSLT/ + +[[!tag tags/tools]] +[[!tag tags/web]] diff --git a/posts/XSLT/chapter.mdwn b/posts/XSLT/chapter.mdwn new file mode 100644 index 0000000..a8ef009 --- /dev/null +++ b/posts/XSLT/chapter.mdwn @@ -0,0 +1 @@ +[[!inline pages="./chapter/*" archive=yes show=0 quick=yes sort="title"]] diff --git a/posts/XSLT/chapter/Makefile b/posts/XSLT/chapter/Makefile new file mode 100644 index 0000000..72094c2 --- /dev/null +++ b/posts/XSLT/chapter/Makefile @@ -0,0 +1,9 @@ +XSLTPROC = xsltproc + +all : chapter.html + +clean : + rm -f chapter.html + +chapter.html : style.xsl chapter.xml + $(XSLTPROC) $^ > $@ diff --git a/posts/XSLT/chapter/README b/posts/XSLT/chapter/README new file mode 100644 index 0000000..c5c6bce --- /dev/null +++ b/posts/XSLT/chapter/README @@ -0,0 +1,5 @@ +From + http://nwalsh.com/docs/tutorials/xsl/xsl/slides.html + +style.xsl http://nwalsh.com/docs/tutorials/xsl/xsl/examples/modes.xsl +chapter.xml http://nwalsh.com/docs/tutorials/xsl/xsl/examples/modes.xml diff --git a/posts/XSLT/chapter/chapter.xml b/posts/XSLT/chapter/chapter.xml new file mode 100644 index 0000000..80f080a --- /dev/null +++ b/posts/XSLT/chapter/chapter.xml @@ -0,0 +1,6 @@ + +Chapter Title + +This chapter is self-referential: +. + diff --git a/posts/XSLT/chapter/style.xsl b/posts/XSLT/chapter/style.xsl new file mode 100644 index 0000000..51e2c67 --- /dev/null +++ b/posts/XSLT/chapter/style.xsl @@ -0,0 +1,29 @@ + + + + + + +

+
+ + + + + + + + + + + +

+
+ + + + + +
diff --git a/posts/XSLT/code.mdwn b/posts/XSLT/code.mdwn new file mode 100644 index 0000000..7eaf4d8 --- /dev/null +++ b/posts/XSLT/code.mdwn @@ -0,0 +1 @@ +[[!inline pages="./code/*" archive=yes show=0 quick=yes sort="title"]] diff --git a/posts/XSLT/code/Makefile b/posts/XSLT/code/Makefile new file mode 100644 index 0000000..bbc89ae --- /dev/null +++ b/posts/XSLT/code/Makefile @@ -0,0 +1,9 @@ +XSLTPROC = xsltproc + +all : index.shtml + +clean : + rm -f index.shtml + +index.shtml : code.xsl index.xml + $(XSLTPROC) $^ > $@ diff --git a/posts/XSLT/code/code.xsl b/posts/XSLT/code/code.xsl new file mode 100644 index 0000000..6a837b4 --- /dev/null +++ b/posts/XSLT/code/code.xsl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + +

+
+ + +

+
+ + + + + + +

+ +

+
+ + +
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/posts/XSLT/code/index.xml b/posts/XSLT/code/index.xml new file mode 100644 index 0000000..6bc8b4f --- /dev/null +++ b/posts/XSLT/code/index.xml @@ -0,0 +1,36 @@ + + + + + <!--#include virtual="/~wking/header.html"--> + + Debugging macros + Something to c + + I've put together a set of macros to make debugging easier. + One day I'll learn how to use external debugging software, but until then... + + + trace_mac.h + + These macros print their messages when the global tk_debug > level. + + + + PING(level) + Prints "PING file.line\n". + + + MSG(level,...) + Prints the message ... . + + + DUMP(level,a,fmt) + Dumps a variable a with a given format fmt. + + + + + <!--#include virtual="/~wking/footer.html"--> + + -- 2.26.2