{"id":13410422,"url":"https://github.com/simonjwright/xia","last_synced_at":"2025-03-14T16:32:10.906Z","repository":{"id":135312640,"uuid":"127127680","full_name":"simonjwright/xia","owner":"simonjwright","description":"An Ada implementation of XPath 1.0.","archived":false,"fork":false,"pushed_at":"2024-01-27T18:06:49.000Z","size":382,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-10T16:55:22.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonjwright.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"COPYING.RUNTIME","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}},"created_at":"2018-03-28T11:04:33.000Z","updated_at":"2024-02-06T15:20:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9b52ee2-b87f-4bd8-bc90-24f14c04cb7b","html_url":"https://github.com/simonjwright/xia","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fxia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fxia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fxia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fxia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonjwright","download_url":"https://codeload.github.com/simonjwright/xia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610204,"owners_count":20318920,"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-07-30T20:01:06.794Z","updated_at":"2025-03-14T16:32:10.361Z","avatar_url":"https://github.com/simonjwright.png","language":"Ada","funding_links":[],"categories":["Libraries"],"sub_categories":["Parsers, Scanners, Linters, Analysers, Interpreters and Prettyprinters"],"readme":"XIA (**X**Path **I**n **A**da) is a native Ada implementation of the XPath 1.0 specification.  XIA is built using the DOM component of AdaCore's XML/Ada implementation and [AdaGOOP](https://adagoop.martincarlisle.com).\n\nSubmitting XPath queries is done via the `XPath_Query` function in package `XIA`. The function returns a Node_List, as defined in `DOM.Core`, whose contents can be accessed with the `Item` function in `DOM.Core.Nodes`.\n\n## Example ##\n\nThe test program [test\\_xpath](test/test_xpath.adb) opens an XML file into the `DOM.Readers.Tree_Reader` (`XML_Source_Reader`) and then executes queries, producing results in a `DOM.Core.Node_List` (`Queried_Nodes`):\n```\nQueried_Nodes :=\n  Xpath_Query (Dom.Readers.Get_Tree (XML_Source_Reader), Query);\n```\nFor each query, it prints out the number of matching nodes and an image of the contents of each.\n\nFor this XML file, modelled loosely on a [Wikipedia example](https://en.wikipedia.org/wiki/XPath#Abbreviated_syntax),\n```\n\u003ca name=\"a1\"\u003e\n  \u003cb name=\"b1\"\u003e\n    \u003cc name=\"c1\"/\u003e\n    \u003cd name=\"d1\"/\u003e\n  \u003c/b\u003e\n  \u003cb name=\"b2\"\u003e\n    \u003ce name=\"e1\"/\u003e\n  \u003c/b\u003e\n  \u003cx name=\"x1\"\u003e\n    \u003cb name=\"b3\"\u003e\n      \u003cf name=\"f1\"/\u003e\n    \u003c/b\u003e\n  \u003c/x\u003e\n\u003c/a\u003e\n```\nthe query\n``` xpath\na//b/*[1]/@name\n```\nfinds 3 nodes, the first child of each `\u003cb/\u003e` node in the document:\n``` text\nNumber of nodes: 3\nname=\"c1\"\nname=\"e1\"\nname=\"f1\"\n```\nwhereas the query\n``` xpath\n(a//b/*)[1]/@name\n```\nfinds one node, the child node of the first `\u003cb/\u003e` node:\n``` text\nNumber of nodes: 1\nname=\"c1\"\n```\n\n## Testing ##\n\nA BASH script, `txia`, and an input file of XPath queries, `txia_tests.txt`, are provided in the `test/` directory to jam a bunch of queries through the test program (if more test queries are added, be sure to leave an empty line after all the queries - text after an empty line is ignored). `txia_tests.txt` also exhibits a wide variety of XPath queries, although the majority of these are nonsense queries as far as realistic usage is concerned, they're tailored to exercise and test various aspects of XIA's implementation.\n\nTo generate the test program, `cd` to the test directory and say `alr build`.\n\nVersion history up to 1.00 is [here](HISTORY.md).\n\nPlease report issues at Github.\n\n- Github maintainer: Simon Wright \u003csimon@pushface.org\u003e\n- Original author: Marc A. Criley \u003cmc@mckae.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fxia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonjwright%2Fxia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fxia/lists"}