{"id":39334152,"url":"https://github.com/egh/xjslt","last_synced_at":"2026-01-18T02:06:49.482Z","repository":{"id":138230252,"uuid":"356371518","full_name":"egh/xjslt","owner":"egh","description":"An XSLT 2.0 compiler (targeting JavaScript) written in TypeScript.","archived":false,"fork":false,"pushed_at":"2025-08-03T13:39:06.000Z","size":1386,"stargazers_count":31,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-03T15:11:11.527Z","etag":null,"topics":["javascript","xslt"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2021-04-09T18:58:08.000Z","updated_at":"2025-08-03T13:22:10.000Z","dependencies_parsed_at":"2024-05-14T07:25:01.183Z","dependency_job_id":"cf06b79b-456f-4b53-8aa6-ad1d52d5790a","html_url":"https://github.com/egh/xjslt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/egh/xjslt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egh%2Fxjslt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egh%2Fxjslt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egh%2Fxjslt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egh%2Fxjslt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egh","download_url":"https://codeload.github.com/egh/xjslt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egh%2Fxjslt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","xslt"],"created_at":"2026-01-18T02:06:46.600Z","updated_at":"2026-01-18T02:06:49.476Z","avatar_url":"https://github.com/egh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XJSLT - An XSLT compiler in TypeScript\n\nXJSLT is an [XSLT 2.0](https://www.w3.org/TR/xslt20/) compiler (targeting JavaScript) written in TypeScript, depending on [fontoxpath](https://github.com/FontoXML/fontoxpath) for an XPath implementation.\n\nXJSLT works by compiling stylesheets to runnable JavaScript. These compiled stylesheets can be used immediately in the command line, or they can be save for later use in the command line. They can also be used programmatically either in the browser or in another JavaScript runtime.\n\nTested with [node 20](https://nodejs.org/) and in Chrome and Firefox.\n\n# Getting started\n\n## Installation:\n- `npm install \u0026\u0026 npm run build`\n\n## Command line invocation:\n- `xjslt jats-html.xsl \u003c(curl -s https://jats.nlm.nih.gov/publishing/tag-library/1.1/FullArticleSamples/bmj_sample.xml)`\n\n# Compilation examples\nXJSLT can compile XSLT stylesheets into executable JavaScript code, which can then be deployed to various platforms that support JavaScript, including the browser, NodeJS, and potentially other JavaScript runtimes. The following are some examples of how to do this for the browser, google cloud functions, and cloudflare edge functions. Note that this compiled `.js` may need to be recompiled if the xjslt version changes.\n\n\n## In the browser\n- `xjslt compile --web jats-html.xsl examples/html/transform.js`\n- Open `examples/html/example.html` (will load the generated `transform.js` file)\n\n## For reuse in the command line\n- `xjslt compile jats-html.xsl`\n- `xjslt transform.js \u003c(curl -s https://jats.nlm.nih.gov/publishing/tag-library/1.1/FullArticleSamples/bmj_sample.xml)`\n\n## In a google cloud function\n- `xjslt compile --standalone jats-html.xsl examples/google-cloud/transform.js`\n- `cd examples/google-cloud`\n- `npm install`\n- `npx @google-cloud/functions-framework --target=transform`\n- Visit http://localhost:8080/?url=https://jats.nlm.nih.gov/publishing/tag-library/1.1/FullArticleSamples/bmj_sample.xml\n\n## In a cloudflare edge function\n- `xjslt compile --standalone jats-html.xsl examples/cloudflare/src/transform.js`\n- `cd examples/cloudflare`\n- `npm install`\n- `npm run start`\n- Visit http://localhost:8787/?url=https://jats.nlm.nih.gov/publishing/tag-library/1.1/FullArticleSamples/bmj_sample.xml\n\n# Supported features\n- `if`/`choose/when/otherwise` - conditional evaluation\n- `template`\n- `apply-templates`/`for-each` - recursive evaluation\n- `element`/`attribute`/`value-of` - dynamic elements, attributes, and text\n- literal text and xml element output\n- `variable`\n- namespaces\n- `sort`\n- `include`/`import`\n- `result-document`\n- 2212 passing tests in the XSLT test suite (https://github.com/w3c/xslt30-test) (2424 not passing)\n\n# Incompletely supported features\n- `for-each-group` (only `group-by` supported)\n- `function` basically working, with better typing TBD\n- `output` not all options supported\n\n# TODO (not yet implemented)\n- [ ] `attribute-set`\n- [ ] `number`\n- [ ] `analyze-string` (depends on https://github.com/bwrrp/xspattern.js/issues/9)\n- [ ] tunneled parameters\n- [ ] … (probably other things I’m not aware of or forgot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegh%2Fxjslt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegh%2Fxjslt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegh%2Fxjslt/lists"}