Compare commits


10 Commits

Author SHA1 Message Date
Mike Gerwitz 279ddc660e link to generated manual 2023-03-19 22:29:20 -04:00
Mike Gerwitz 6b632af8d7
Remove lingering tools/xsltexi reference
* tools/xsltexi: Removed
2016-08-23 14:54:16 -04:00
Mike Gerwitz 5594c17dd9
Add INSTALL to distribution
2016-07-20 00:21:45 -04:00
Mike Gerwitz 33d11cd038
* INSTALL: Added
2016-07-20 00:20:15 -04:00
Mike Gerwitz 6d8383ade3
* EXTRA_DIST added to complete distribution
2016-07-19 23:56:41 -04:00
Mike Gerwitz bb246b9bf2
apply-gen stylesheet version copy if provided
* src/transform/apply-gen.xsl: Use input stylesheet version if provided,
  otherwise 2.0.

* test/transform/apply-gen.xpsec: Test added
2016-07-05 00:16:36 -04:00
Mike Gerwitz 1fc360bc1c
Copy all stylesheet namespaces during apply-gen
* src/transform/apply-gen.xsl: Copy /xsl:*/namespace::*
* test/transform/apply-gen.xspec: Add respective test
2016-07-05 00:04:44 -04:00
Mike Gerwitz cc91a821e8
clean-local target for *.apply cleanup (clean-local): Clean up generated *.apply files for tests.
2016-07-05 00:04:36 -04:00
Mike Gerwitz 26cba8eb52
xspec update for xsl:*/namespace::* retention
Allows testing namespace manipulation on xsl:* nodes (see next commit).
2016-07-05 00:04:23 -04:00
Mike Gerwitz 289cd8b802
Update manual copyright for 2016
* doc/hoxsl.texi: add 2016 copyright for mtg
2016-04-01 22:04:03 -04:00
8 changed files with 99 additions and 10 deletions

INSTALL 100644
View File

@ -0,0 +1,40 @@
hoxsl may be used directly from the distribution archive.
To build from source (including a repository checkout), see `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 tools/literate-xsl
$ git clone tools/xspec
The latter is required only if running test cases (using `make check').
Once dependencies are in place, simply run:
$ ./configure
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`.

View File

@ -1,6 +1,7 @@
## 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
# it under the terms of the GNU General Public License as published by
@ -17,6 +18,7 @@
EXTRA_DIST = INSTALL COPYING.FDL src test doc/macros.texi
path_src := src
path_test := test
@ -35,3 +37,6 @@ check: $(test_apply)
$(JAVA) -jar "$(SAXON_CP)" \
-xsl:"$(path_src)/transform/apply-gen.xsl" \
"$<" > "$@"
$(RM) $(test_apply)

View File

@ -11,13 +11,12 @@
# Higher-Order XSLT
hoxsl is a library for XSLT 2.0, written in pure XSLT, introducing
various types of higher-order logic; this includes higher-order
functions and XSLT templates that take XSLT as input and produce XSLT
as output.
various higher-order operations; this includes higher-order functions and
XSLT templates that take XSLT as input and produce XSLT as output.
The system is fully tested---see the test cases for additional
documentation as this project gets under way. This README will serve
as an informal manual until official documentation is produced.
documentation as this project gets under way. The manual is "woven" from
literate sources; [a compiled version is available online][manual].
## Higher-Order Functions
@ -114,3 +113,5 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.

View File

@ -11,8 +11,8 @@
This manual is for hoxsl, version @value{VERSION}.
Copyright @copyright{} 2015, 2016 Mike Gerwitz
Copyright @copyright{} 2014, 2015 LoVullo Associates, Inc.
Copyright @copyright{} 2015 Mike Gerwitz
Permission is granted to copy, distribute and/or modify this document

View File

@ -62,7 +62,11 @@
<text>hoxsl; please do not modify</text>
<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" />

View File

@ -40,6 +40,46 @@
<!-- 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">
<xsl:stylesheet version="7.05" />
<expect label="is copied to output"
test="xsl:stylesheet/@version = '7.05'" />
<scenario label="when empty">
<xsl:stylesheet />
<expect label="defaults to 2.0"
test="xsl:stylesheet/@version = '2.0'" />
<!-- source namespaces must be copied -->
<scenario label="source namespaces">
<xsl:stylesheet xmlns:foobar="baz">
<xsl:function name="foobar:baz">
<xsl:param name="foo" />
<expect label="are copied to destination"
test="exists( xsl:stylesheet/namespace::foobar )" />
<!-- basic case -->
<scenario label="given a unary function">

@ -1 +0,0 @@
Subproject commit 5cded3d64bec3c0c2b42b67169aa27cf5810bc50

@ -1 +1 @@
Subproject commit 20c6b8a32f37a6511698fe89b78b82fd1aa64bd2
Subproject commit fcd852b0482d0a61d016867b5bfd463f7193f0cb