{"id":19838965,"url":"https://github.com/objectionary/xax","last_synced_at":"2025-05-01T18:31:42.825Z","repository":{"id":64285115,"uuid":"574534248","full_name":"objectionary/xax","owner":"objectionary","description":"Java library for testing XSL stylesheets with XML samples and XPath assertions","archived":false,"fork":false,"pushed_at":"2025-04-29T05:32:06.000Z","size":253,"stargazers_count":6,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-29T06:27:20.905Z","etag":null,"topics":["hamcrest-matchers","java","jcabi","xml","xsl","xslt"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/objectionary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-05T14:20:43.000Z","updated_at":"2025-04-12T02:22:25.000Z","dependencies_parsed_at":"2024-04-25T16:42:22.940Z","dependency_job_id":"d629aaa6-147d-48e1-abf4-adba7259ad4c","html_url":"https://github.com/objectionary/xax","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":0.3076923076923077,"last_synced_commit":"547a5251cdc8ac94bfbffa638d5bc854750818a2"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fxax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fxax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fxax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fxax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectionary","download_url":"https://codeload.github.com/objectionary/xax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924791,"owners_count":21666038,"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":["hamcrest-matchers","java","jcabi","xml","xsl","xslt"],"created_at":"2024-11-12T12:19:45.847Z","updated_at":"2025-05-01T18:31:42.819Z","avatar_url":"https://github.com/objectionary.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JUnit Matcher for XSL Transformations\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](https://www.rultor.com/b/objectionary/xax)](https://www.rultor.com/p/objectionary/xax)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![mvn](https://github.com/objectionary/xax/actions/workflows/mvn.yml/badge.svg)](https://github.com/objectionary/xax/actions/workflows/mvn.yml)\n[![PDD status](https://www.0pdd.com/svg?name=objectionary/xax)](https://www.0pdd.com/p?name=objectionary/xax)\n[![Maven Central](https://img.shields.io/maven-central/v/org.eolang/xax.svg)](https://maven-badges.herokuapp.com/maven-central/org.eolang/xax)\n[![Javadoc](https://www.javadoc.io/badge/org.eolang/xax.svg)](https://www.javadoc.io/doc/org.eolang/xax)\n[![codecov](https://codecov.io/gh/objectionary/xax/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/xax)\n[![Hits-of-Code](https://hitsofcode.com/github/objectionary/xax)](https://hitsofcode.com/view/github/objectionary/xax)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/xax/blob/master/LICENSE.txt)\n\nThis simple library can help you test your XSL stylesheets against different XML\ndocument and assert the validity of transformations using XPath expressions.\n\nYou add this to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.eolang\u003c/groupId\u003e\n  \u003cartifactId\u003exax\u003c/artifactId\u003e\n  \u003cversion\u003e0.6.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThen, create this XSL file in `src/main/resources/simple.xsl`:\n\n```xml\n\u003cxsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"2.0\"\u003e\n  \u003cxsl:template match=\"foo\"\u003e\n    \u003cxsl:copy\u003e\n      \u003cxsl:text\u003ebye\u003c/xsl:text\u003e\n    \u003c/xsl:copy\u003e\n  \u003c/xsl:template\u003e\n  \u003cxsl:template match=\"node()|@*\" mode=\"#default\"\u003e\n    \u003cxsl:copy\u003e\n      \u003cxsl:apply-templates select=\"node()|@*\"/\u003e\n    \u003c/xsl:copy\u003e\n  \u003c/xsl:template\u003e\n\u003c/xsl:stylesheet\u003e\n```\n\nThen, create this YAML file in `src/test/resources/simple.yaml`:\n\n```yaml\nsheets:\n  - simple.xsl\ndocument:\n  \u003cdoc\u003e\u003cfoo\u003ehello\u003c/foo\u003e\u003c/doc\u003e\nasserts:\n  - /doc/foo[.='bye']\n```\n\nFinally, make a unit test (using\n[JUnit5](https://github.com/junit-team/junit5),\n[Hamcrest](https://github.com/hamcrest/JavaHamcrest),\nand `@ClasspathSource` from [Jucs](https://github.com/objectionary/jucs)):\n\n```java\nimport org.eolang.jucs.ClasspathSource;\nimport org.hamcrest.MatcherAssert;\nimport org.hamcrest.Matchers;\nimport org.junit.jupiter.params.ParameterizedTest;\n\nfinal class MyTest {\n    @ParameterizedTest\n    @ClasspathSource(value = \"\", glob = \"**.yaml\")\n    void itWorks(String yaml) {\n        MatcherAssert.assertThat(\n            new XaxStory(yaml),\n            Matchers.is(true)\n        );\n    }\n}\n```\n\nShould work.\n\n## How to Contribute\n\nFork repository, make changes, send us a\n[pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nWe will review your changes and apply them to the `master` branch shortly,\nprovided they don't violate our quality standards. To avoid frustration,\nbefore sending us your pull request please run full Maven build:\n\n```bash\nmvn clean install -Pqulice\n```\n\nYou will need Maven 3.3+ and Java 8+.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fxax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectionary%2Fxax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fxax/lists"}