{"id":15738783,"url":"https://github.com/mbg/c14n","last_synced_at":"2025-04-28T11:25:32.261Z","repository":{"id":55892096,"uuid":"274983707","full_name":"mbg/c14n","owner":"mbg","description":"Haskell bindings for the c14n implementation in LibXML (XML canonicalisation)","archived":false,"fork":false,"pushed_at":"2024-01-01T15:23:59.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T23:02:20.769Z","etag":null,"topics":["c14n","canonicalization","haskell","xml"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/mbg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-06-25T18:07:41.000Z","updated_at":"2021-11-16T13:16:05.000Z","dependencies_parsed_at":"2024-01-01T16:22:30.556Z","dependency_job_id":"217952ff-3c5f-4551-a548-04ab52e5819f","html_url":"https://github.com/mbg/c14n","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":"0.31999999999999995","last_synced_commit":"0e6b41bc371ca40bd37499826695d1ee311b864b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbg%2Fc14n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbg%2Fc14n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbg%2Fc14n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbg%2Fc14n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbg","download_url":"https://codeload.github.com/mbg/c14n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229476082,"owners_count":18078978,"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":["c14n","canonicalization","haskell","xml"],"created_at":"2024-10-04T02:01:33.334Z","updated_at":"2024-12-13T01:22:02.562Z","avatar_url":"https://github.com/mbg.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c14n\n\n![GitHub](https://img.shields.io/github/license/mbg/c14n)\n[![Haskell](https://github.com/mbg/c14n/actions/workflows/haskell.yml/badge.svg)](https://github.com/mbg/c14n/actions/workflows/haskell.yml)\n[![Stackage Nightly](https://github.com/mbg/c14n/actions/workflows/stackage-nightly.yml/badge.svg)](https://github.com/mbg/c14n/actions/workflows/stackage-nightly.yml)\n[![Hackage](https://img.shields.io/hackage/v/c14n)](https://hackage.haskell.org/package/c14n)\n\nHaskell bindings for the c14n implementation in libxml (XML canonicalisation). Unfortunately there is (at the time of writing) no pure Haskell implementation, so this seems like the best option.\n\n## Requirements\n\nYou need to have `libxml2` installed, including on macOS (with `brew install libxml2`). Then build with `stack build`.\n\n## Usage\n\nThe `Text.XML.C14N` module exports a function named `c14n` which provides a mid-level interface to the canonicalisation function from `libxml2`. It will handle most of the marshalling, but not much more. For example:\n\n```haskell\n\u003e c14n [] c14n_1_1 [] False Nothing \"\u003croot\u003efoo\u003c!-- comment --\u003ebar\u003c/root\u003e\"\n\"\u003croot\u003efoobar\u003c/root\u003e\"\n```\n\nThe arguments, in order, are:\n\n* Parser options, see the module documentation or the [libxml2 documentation](http://xmlsoft.org/html/libxml-parser.html)\n* The canonicalisation specification to use (`c14n_1_0`, `c14n_exclusive_1_0`, or `c14n_1_1`).\n* A (potentially empty) list of namespace prefixes which is used when the canonicalisation specification used is `c14n_exclusive_1_0`\n* A boolean value indicating whether to keep comments in the output or not.\n* An XPath location path used to select a set of nodes that should be included in the canonicalised result\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbg%2Fc14n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbg%2Fc14n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbg%2Fc14n/lists"}