{"id":17195962,"url":"https://github.com/npryce/xsltest","last_synced_at":"2026-01-06T01:07:54.111Z","repository":{"id":66701982,"uuid":"2273346","full_name":"npryce/xsltest","owner":"npryce","description":"XSLTest: XSLT easy stylesheet testing","archived":false,"fork":false,"pushed_at":"2011-09-08T11:52:17.000Z","size":112,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T07:28:35.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npryce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-26T09:39:08.000Z","updated_at":"2019-04-24T09:39:21.000Z","dependencies_parsed_at":"2023-02-20T09:25:24.522Z","dependency_job_id":null,"html_url":"https://github.com/npryce/xsltest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fxsltest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fxsltest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fxsltest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fxsltest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npryce","download_url":"https://codeload.github.com/npryce/xsltest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423193,"owners_count":20612748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T01:51:58.492Z","updated_at":"2026-01-06T01:07:54.087Z","avatar_url":"https://github.com/npryce.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"XSLTest: XSLT easy stylesheet testing\n=====================================\n\nRequirements:\n-------------\n\n * An XSLT 2 processor, such as Saxon.\n * A web browser to view the test reports.\n\n\nOverview\n--------\n\nXSLTest lets you test XSLT transforms and functions using a mix of\nXSLT code, XSLTest elements that define assertions and test suites and\nembedded HTML documentation.\n\nAn XSLTest suite is an XSLT stylesheet with named templates that\ngenerate HTML and also contain XSLTest elements.  \n\nThe XSLTest framework acts as a compiler: the `xsltest.xslt`\nstylesheet translates a test suite into a stylesheet that performs the\nassertions and generates results in XML format.  XSLTest's\n`report.xslt` stylesheet translates the results into an HTML report.\n\nXSLTest also provides a stylesheet, `test-abort-build.xslt`, that\nfails if the results XML contain any test failures.  This is useful\nfor aborting the build when tests fail.\n\nExample tests written with XSLTest can be found here: \n[https://github.com/npryce/courseware-html/tree/master/tests](https://github.com/npryce/courseware-html/tree/master/tests)\n\n\nTest Suite Structure and XML Namespaces\n---------------------------------------\n\nXSLTest elements are defined in the namespace http://www.natpryce.com/xsltest/1.0.\n\nThe entry-point to a test suite is a named XSLT template.  For example:\n\n    \u003cxsl:stylesheet version=\"2.0\"\n                    xmlns=\"http://www.w3.org/1999/xhtml\" \n                    xmlns:html=\"http://www.w3.org/1999/xhtml\" \n                    xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" \n                    xmlns:fn=\"http://www.w3.org/2005/xpath-functions\" \n                    xmlns:test=\"http://www.natpryce.com/xsltest/1.0\"\u003e\n\n      \u003cxsl:import href=\"mycode.xslt\"/\u003e\n      \n      \u003cxsl:template name=\"mycode-tests\"\u003e\n          \u003ctest:suite\u003e\n              \u003ch1\u003eTests for My Code\u003c/h1\u003e\n              \n              ... assertions and suites go here ...\n\n          \u003c/test:suite\u003e\n      \u003c/xsl:template\u003e\n    \u003c/xsl:stylesheet\u003e\n\n\nExample Makefile Rules\n----------------------\n\nThe following example Makefile rules implement the XSLTest processing pipeline.\n\n\n\tbuild/testing/%.xslt: src/%-test.xslt\n\t\t@mkdir -p $(dir $@)\n\t\tsaxon -xsl:$(XSLTEST_HOME)/xsltest.xslt -s:$\u003c -o:$@\n    \n\tbuild/testing/results.xml: $(XSLT_TESTS:tests/%.xslt=build/testing/%.xslt) $(XSLT)\n\t\tsaxon -xsl:build/testing/all-tests.xslt -it:all-tests -o:$@\n        \n\tbuild/testing/report.html: build/testing/results.xml\n\t\tsaxon -xsl:$(XSLTEST_HOME)/report.xslt -s:$\u003c -o:$@\n    \n\t# Avoid saxon's slow startup if we can say for sure that no tests failed\n\tcheck: build/testing/report.html\n\t\t@if grep -q -m 1 'result=\"failed\"' build/testing/results.xml; then \\\n\t\t\tsaxon -xsl:$(XSLTEST_HOME)/test-abort-build.xslt -s:build/testing/results.xml; \\\n\t\tfi\n\n\nThe rules assume that:\n\n * The variable XSLTEST_HOME refers to the directory containing the XSLTest stylesheets.\n * The test suite files all have the suffix `-test.xslt` and are in the `src/` directory alongside the code under test.\n * Output is generated into a scratch directory named `build/testing`.\n * There is a single root test suite, named `all-tests.xslt`, that imports all the other test suites in the test directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpryce%2Fxsltest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpryce%2Fxsltest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpryce%2Fxsltest/lists"}