{"id":16087013,"url":"https://github.com/noha/xml-testsuite","last_synced_at":"2025-04-05T14:44:05.443Z","repository":{"id":1677385,"uuid":"2404483","full_name":"noha/xml-testsuite","owner":"noha","description":"very simple test suite that helps when creating an XML schema","archived":false,"fork":false,"pushed_at":"2011-09-17T11:02:12.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T11:42:01.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/noha.png","metadata":{"files":{"readme":"Readme","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-09-17T11:02:01.000Z","updated_at":"2013-10-31T18:42:51.000Z","dependencies_parsed_at":"2022-09-07T19:01:21.373Z","dependency_job_id":null,"html_url":"https://github.com/noha/xml-testsuite","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/noha%2Fxml-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noha%2Fxml-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noha%2Fxml-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noha%2Fxml-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noha","download_url":"https://codeload.github.com/noha/xml-testsuite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353676,"owners_count":20925325,"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-09T13:26:56.154Z","updated_at":"2025-04-05T14:44:05.420Z","avatar_url":"https://github.com/noha.png","language":"Shell","readme":"xml testsuite\n-------------\n\nThis is a tiny utility that helps running several XML schema files against a bunch \nof XML files. While developing a XML schema I missed a comparable experience to\nsoftware development where I can just write some tests and run them while evolving\nthings.\n\nThe approach is really simple. There are three information bits that are needed to\ndo a single run:\n\n1 a XML file to be tested\n2 a XML schema that is used to test\n3 a status flag if the test should pass or fail\n\nSo we are creating a XML file (1) and encode the schema (2) and the test status (3) in \nthe filename. To ease this a configuration file for schemas has to be created\n\nschema-config\n-------------\n\nThe file has a simple structure and assigns a XML schema file to a pattern.\n\nschemas[simple]=\"simple.xsd\"\n\nEvery file name that matches \"simple\" will be assigned to \"simple.xsd\" to test. Second\nthe label \"invalid\" marks a file as deliberately wrong which means it is supposed to \nfail. A filename of\n\nsimple-example-invalid.xml\n\npasses the test if the validation with the schema in simple.xsd throws an error\n\nhow to use\n----------\n\nJust invoke\n\n./xml-testsuite.sh examples/simple*\n\nand you'll see\n\nOK   examples/simple-example-invalid.xml\nOK   examples/simple-example.xml\n\nThe script looks for the schema-config file in the current working directory. This way\na schema-config can be created on purpose. All files to test are given via commandline.\nErrors are reported immediately. If you invoke\n\n./xml-testsuite.sh examples/*\n\nthen you get\n\nexamples/bogus-example.xml does not match a schema. ignoring...\n---------------\nFAIL examples/bogus-simple-example.xml\nexamples/bogus-simple-example.xml:1: element simple: Schemas validity error : Element '{urn:simple:example}simple': Missing child element(s). Expected is ( {urn:simple:example}simplekid ). examples/bogus-simple-example.xml fails to validate\n---------------\nOK   examples/simple-example-invalid.xml\nOK   examples/simple-example.xml\n\nThe file bogus-example.xml does not match any schema configuration so it is reported. The next\nfile bogus-simple-example.xml does not behave as expected so the test fails and the error is\nprinted below it. This way it works quite well to create test files and fix the bugs.\n\nMac OS X\n--------\n\nThe script uses a bash version \u003e 4.0. Mac OS X ships with bash 3.x so the script won't work out\nof the box. If you have macports or homebrew just install the new bash and make sure it is either\nin your PATH or in the script\n\nAuthor: Norbert Hartl \u003cnorbert@hartl.name\u003e\nLicense is MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoha%2Fxml-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoha%2Fxml-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoha%2Fxml-testsuite/lists"}