From e8e2dff3e6b9dd5aea44cef544ef3153d8092085 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 23 Mar 2016 23:53:05 -0400 Subject: [PATCH] Basic record suppport * record.xsl: added This only support unnamed slots. * record.xspec: added Notice the documentation style: all sentences and clauses of compound sentences are on their own lines, indented relative to their parent. This produces much better diffs when things change. --- doc/hoxsl.texi | 7 +- doc/macros.texi | 8 + src/record.xsl | 414 ++++++++++++++++++++++++++++++++++++++++++++++ test/record.xspec | 202 ++++++++++++++++++++++ 4 files changed, 630 insertions(+), 1 deletion(-) create mode 100644 src/record.xsl create mode 100644 test/record.xspec diff --git a/doc/hoxsl.texi b/doc/hoxsl.texi index 4bf67a6..a8060a7 100644 --- a/doc/hoxsl.texi +++ b/doc/hoxsl.texi @@ -45,7 +45,8 @@ Free Documentation License". @include macros.texi @menu -* Higher-Order Functions:: XSLT 2.0 compatible higher-order functions +* Higher-Order Functions:: XSLT 2.0-compatible higher-order functions +* Records:: Structured data within sequences * Node Constructors:: Constructing nodes functionally * License:: Document License @end menu @@ -59,6 +60,10 @@ Free Documentation License". @chapter Higher-Order Functions @include ../src/apply.texi +@node Records +@chapter Records +@include ../src/record.texi + @node Node Constructors @chapter Node Constructors @include ../src/node.texi diff --git a/doc/macros.texi b/doc/macros.texi index ce37996..85e10bd 100644 --- a/doc/macros.texi +++ b/doc/macros.texi @@ -23,3 +23,11 @@ @macro xmlcomment{comment} @end macro + +@macro mdash{} +--- +@end macro + +@macro todo{text} +@strong{TODO:} \text\ +@end macro diff --git a/src/record.xsl b/src/record.xsl new file mode 100644 index 0000000..ce961c0 --- /dev/null +++ b/src/record.xsl @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/record.xspec b/test/record.xspec new file mode 100644 index 0000000..4ed1d1f --- /dev/null +++ b/test/record.xspec @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +