Compare commits
10 Commits
09bf0d1807
...
279ddc660e
Author | SHA1 | Date |
---|---|---|
Mike Gerwitz | 279ddc660e | |
Mike Gerwitz | 6b632af8d7 | |
Mike Gerwitz | 5594c17dd9 | |
Mike Gerwitz | 33d11cd038 | |
Mike Gerwitz | 6d8383ade3 | |
Mike Gerwitz | bb246b9bf2 | |
Mike Gerwitz | 1fc360bc1c | |
Mike Gerwitz | cc91a821e8 | |
Mike Gerwitz | 26cba8eb52 | |
Mike Gerwitz | 289cd8b802 |
|
@ -0,0 +1,40 @@
|
||||||
|
hoxsl may be used directly from the distribution archive.
|
||||||
|
|
||||||
|
To build from source (including a repository checkout), see `Configuring'
|
||||||
|
below.
|
||||||
|
|
||||||
|
|
||||||
|
Configuring
|
||||||
|
===========
|
||||||
|
If your distribution contains a `configure` file in the project root, you
|
||||||
|
may immediately run `./configure`.
|
||||||
|
|
||||||
|
Otherwise, you likely have the sources as they exist in the project
|
||||||
|
repository, which does not contain the generated `configure` script; you
|
||||||
|
may generate it by issuing the following command:
|
||||||
|
|
||||||
|
$ autoreconf -fvi
|
||||||
|
|
||||||
|
hoxsl has two dependencies, which may be cloned as such:
|
||||||
|
|
||||||
|
$ git clone https://github.com/lovullo/literate-xsl tools/literate-xsl
|
||||||
|
$ git clone https://github.com/lovullo/xspec tools/xspec
|
||||||
|
|
||||||
|
The latter is required only if running test cases (using `make check').
|
||||||
|
Once dependencies are in place, simply run:
|
||||||
|
|
||||||
|
$ ./configure
|
||||||
|
|
||||||
|
|
||||||
|
Building
|
||||||
|
========
|
||||||
|
After running `configure' above, all necessary runtime files and literate
|
||||||
|
documentation may be built by running:
|
||||||
|
|
||||||
|
$ make
|
||||||
|
|
||||||
|
To build the distribution files, run `make distdir`. To create the
|
||||||
|
distribution tarball, run `make dist`.
|
||||||
|
|
||||||
|
To run all tests, run `make check`.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
## hoxsl Makefile
|
## hoxsl Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 LoVullo Associates, Inc.
|
# Copyright (C) 2016 Mike Gerwitz
|
||||||
|
# Copyright (C) 2014 LoVullo Associates, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
SUBDIRS = doc
|
SUBDIRS = doc
|
||||||
|
EXTRA_DIST = INSTALL COPYING.FDL README.md src test doc/macros.texi
|
||||||
|
|
||||||
path_src := src
|
path_src := src
|
||||||
path_test := test
|
path_test := test
|
||||||
|
@ -35,3 +37,6 @@ check: $(test_apply)
|
||||||
$(JAVA) -jar "$(SAXON_CP)" \
|
$(JAVA) -jar "$(SAXON_CP)" \
|
||||||
-xsl:"$(path_src)/transform/apply-gen.xsl" \
|
-xsl:"$(path_src)/transform/apply-gen.xsl" \
|
||||||
"$<" > "$@"
|
"$<" > "$@"
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
$(RM) $(test_apply)
|
||||||
|
|
11
README.md
11
README.md
|
@ -11,13 +11,12 @@
|
||||||
-->
|
-->
|
||||||
# Higher-Order XSLT
|
# Higher-Order XSLT
|
||||||
hoxsl is a library for XSLT 2.0, written in pure XSLT, introducing
|
hoxsl is a library for XSLT 2.0, written in pure XSLT, introducing
|
||||||
various types of higher-order logic; this includes higher-order
|
various higher-order operations; this includes higher-order functions and
|
||||||
functions and XSLT templates that take XSLT as input and produce XSLT
|
XSLT templates that take XSLT as input and produce XSLT as output.
|
||||||
as output.
|
|
||||||
|
|
||||||
The system is fully tested---see the test cases for additional
|
The system is fully tested---see the test cases for additional
|
||||||
documentation as this project gets under way. This README will serve
|
documentation as this project gets under way. The manual is "woven" from
|
||||||
as an informal manual until official documentation is produced.
|
literate sources; [a compiled version is available online][manual].
|
||||||
|
|
||||||
|
|
||||||
## Higher-Order Functions
|
## Higher-Order Functions
|
||||||
|
@ -114,3 +113,5 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
[nova-ho]: http://conferences.idealliance.org/extreme/html/2006/Novatchev01/EML2006Novatchev01.html
|
[nova-ho]: http://conferences.idealliance.org/extreme/html/2006/Novatchev01/EML2006Novatchev01.html
|
||||||
[xslt-30-ho]: http://www.w3.org/TR/xslt-30/#dt-higher-order-operand
|
[xslt-30-ho]: http://www.w3.org/TR/xslt-30/#dt-higher-order-operand
|
||||||
|
[manual]: https://mikegerwitz.com/hoxsl/manual/
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
@copying
|
@copying
|
||||||
This manual is for hoxsl, version @value{VERSION}.
|
This manual is for hoxsl, version @value{VERSION}.
|
||||||
|
|
||||||
|
Copyright @copyright{} 2015, 2016 Mike Gerwitz
|
||||||
Copyright @copyright{} 2014, 2015 LoVullo Associates, Inc.
|
Copyright @copyright{} 2014, 2015 LoVullo Associates, Inc.
|
||||||
Copyright @copyright{} 2015 Mike Gerwitz
|
|
||||||
|
|
||||||
@quotation
|
@quotation
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
|
|
@ -62,7 +62,11 @@
|
||||||
<text>hoxsl; please do not modify</text>
|
<text>hoxsl; please do not modify</text>
|
||||||
</comment>
|
</comment>
|
||||||
|
|
||||||
<out:stylesheet version="2.0">
|
<out:stylesheet version="{( @version, '2.0' )[ 1 ]}">
|
||||||
|
<!-- namespaces might be referenced in strings (e.g. @as), and so may
|
||||||
|
not be copied by default -->
|
||||||
|
<sequence select="namespace::*[ name() ]" />
|
||||||
|
|
||||||
<xsl:apply-templates mode="fgen:create" />
|
<xsl:apply-templates mode="fgen:create" />
|
||||||
</out:stylesheet>
|
</out:stylesheet>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
@ -40,6 +40,46 @@
|
||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- while functions are only supported in version >=2, this could be run
|
||||||
|
on future versions, and we want to make sure that we don't break
|
||||||
|
anything -->
|
||||||
|
<scenario label="stylesheet version">
|
||||||
|
<scenario label="when provided">
|
||||||
|
<context>
|
||||||
|
<xsl:stylesheet version="7.05" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<expect label="is copied to output"
|
||||||
|
test="xsl:stylesheet/@version = '7.05'" />
|
||||||
|
</scenario>
|
||||||
|
|
||||||
|
|
||||||
|
<scenario label="when empty">
|
||||||
|
<context>
|
||||||
|
<xsl:stylesheet />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<expect label="defaults to 2.0"
|
||||||
|
test="xsl:stylesheet/@version = '2.0'" />
|
||||||
|
</scenario>
|
||||||
|
</scenario>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- source namespaces must be copied -->
|
||||||
|
<scenario label="source namespaces">
|
||||||
|
<context>
|
||||||
|
<xsl:stylesheet xmlns:foobar="baz">
|
||||||
|
<xsl:function name="foobar:baz">
|
||||||
|
<xsl:param name="foo" />
|
||||||
|
</xsl:function>
|
||||||
|
</xsl:stylesheet>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<expect label="are copied to destination"
|
||||||
|
test="exists( xsl:stylesheet/namespace::foobar )" />
|
||||||
|
</scenario>
|
||||||
|
|
||||||
|
|
||||||
<!-- basic case -->
|
<!-- basic case -->
|
||||||
<scenario label="given a unary function">
|
<scenario label="given a unary function">
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 5cded3d64bec3c0c2b42b67169aa27cf5810bc50
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 20c6b8a32f37a6511698fe89b78b82fd1aa64bd2
|
Subproject commit fcd852b0482d0a61d016867b5bfd463f7193f0cb
|
Loading…
Reference in New Issue