{"id":19873564,"url":"https://github.com/eerohele/exalt","last_synced_at":"2025-05-02T10:30:28.248Z","repository":{"id":151300571,"uuid":"41554225","full_name":"eerohele/exalt","owner":"eerohele","description":"A Sublime Text plugin for validating and formatting XML documents","archived":false,"fork":false,"pushed_at":"2021-01-27T09:41:09.000Z","size":190,"stargazers_count":23,"open_issues_count":5,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-07T00:51:14.394Z","etag":null,"topics":["sublime-text","xml","xslt"],"latest_commit_sha":null,"homepage":"","language":"Python","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/eerohele.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-28T15:18:59.000Z","updated_at":"2025-03-22T01:45:01.000Z","dependencies_parsed_at":"2023-04-25T14:47:30.579Z","dependency_job_id":null,"html_url":"https://github.com/eerohele/exalt","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerohele%2Fexalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerohele%2Fexalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerohele%2Fexalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerohele%2Fexalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eerohele","download_url":"https://codeload.github.com/eerohele/exalt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252023096,"owners_count":21682132,"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":["sublime-text","xml","xslt"],"created_at":"2024-11-12T16:19:10.180Z","updated_at":"2025-05-02T10:30:28.239Z","avatar_url":"https://github.com/eerohele.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Exalt\n=====\n\nExalt is a [Sublime Text] plugin for validating and formatting XML documents.\n\n**Note**: You might also want to check out [LSP-lemminx](https://packagecontrol.io/packages/LSP-lemminx).\n\n\u003cimg src=\"screenshot.png\"/\u003e\n\n*The theme in the screenshot is [Boxy].*\n\n## Features\n\n### Validate files on the fly\n\nValidate XML, XHTML, and XSLT files on the fly with [lxml]\nwith these validation mechanisms:\n\n- [Document Type Definition][dtd] (DTD)\n- [XML schema][xsd] (XSD)\n- [RelaxNG schema][rng] (RNG)\n- [Schematron schema][schematron]\n\nExalt supports [XML catalogs][xml-catalog] via [lxml][lxml].\n\n#### XSLT validation\n\nIf the syntax of your current file is set to [XSLT][xslt], Exalt automatically\nvalidates the file against\n[Norman Walsh's Relax NG grammars for XSLT stylesheets][ndw].\n\n#### XSD validation\n\nExalt uses the `xsi:schemaLocation` or the `xsi:noNamespaceSchemaLocation`\nattribute of the root element to validate against the schema defined in that\nattribute.\n\nThis means Exalt can validate [Maven][maven] POM files that look like this:\n\n```xml\n\u003cproject xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0\n                             http://maven.apache.org/maven-v4_0_0.xsd\"\u003e\n    \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e\n\n    \u003cgroupId\u003efoobar\u003c/groupId\u003e\n\n    . . .\n\u003c/project\u003e\n```\n\nYou'll probably want to set up an [XML catalog][xml-catalog] to avoid having to\nfetch schemas from the internet. See **Installing** for more information.\n\n#### `xml-model` validation\n\nExalt also supports the [`xml-model`][xml-model] processing instruction. That\nmeans that you can have a processing instruction like this before the root\nelement of your [DITA XML 1.2][dita] document (but *after* the XML declaration,\nof course):\n\n```xml\n\u003c?xml-model href=\"urn:dita-ng:dita:rng:topic.rng\"\n            schematypens=\"http://relaxng.org/ns/structure/1.0\"?\u003e\n```\n\nExalt will validate against the schema in the `href` pseudo-attribute. It\nuses the XML catalog you've set up to resolve the path in the `href`\npseudo-attribute and the `schematypens` pseudo-attribute to determine the the\ntype of the schema.\n\nYou can also use absolute or relative paths in the `href` pseudo-attribute:\n\n```xml\n\u003c!-- Relax NG --\u003e\n\u003c?xml-model href=\"file:///etc/xml/common/schemas/docbook/docbook-5.0/docbook.rng\"\n            schematypens=\"http://relaxng.org/ns/structure/1.0\"?\u003e\n\n\u003c!-- XML Schema --\u003e\n\u003c?xml-model href=\"../docbook-5.0/xsd/docbook.xsd\"\n            schematypens=\"http://www.w3.org/2001/XMLSchema\"?\u003e\n\n\u003c!-- ISO Schematron --\u003e\n\u003c?xml-model href=\"file:///etc/xml/common/schemas/dita/schematron/dita-1.2-for-xslt1.sch\"\n            schematypens=\"http://purl.oclc.org/dsdl/schematron\"?\u003e\n```\n\nIf your file doesn't validate, you can press `⌘ + Ctrl + E` to jump to the\nvalidation error if it's not already in view.\n\n### Format XML \u0026 HTML files\n\nPress `⌘ + Ctrl + X` to reformat (pretty-print) an XML or HTML file. If\nyou have nothing selected, Exalt will format the entire document. If you\nhave one or more selections, Exalt will format those.\n\n**NOTE**: When formatting a selection, Exalt assumes the selection is a\nwell-formed XML fragment. It will try to recover, but if your selection\nisn't well-formed, chances are the result is not what you want.\n\nExalt tries to format non-well-formed XML files via the [libxml2][libxml2]\n`recover` flag.\n\n### Schema caching\n\nExalt caches the schemas it uses for performance. This is useful if you're\nworking on XML documents that use large schemas or when the schema is stored\nelsewhere than your computer.\n\nHowever, this means that if you're developing a schema, the changes in the\nschema will not take effect until you clear the Exalt schema cache.\n\nTo clear the schema cache, run the `Exalt: Clear Parser Cache` command via\nthe Sublime Text command palette. If you need to do it often, you might want\nto add a keyboard shortcut for that command in the Sublime Text settings.\n\n## Installing\n\n1. Install Exalt via [Package Control][package-control].\n2. Restart Sublime Text.\n3. (*Optional, but recommended*.) In `User/Exalt.sublime-settings`, set the\n   path to your [XML catalog files][xml-catalog].\n\n    For example:\n\n    ```json\n    {\n      \"xml_catalog_files\": [\"/etc/xml/catalog\", \"~/.schemas/catalog.xml\"]\n    }\n    ```\n\n    By default, the plugin uses the catalog files defined in\n    `Exalt/Exalt.sublime-settings`. Those catalog files might or might not\n    exist on your system.\n\n    If you want, you can use my [`catalogs`][catalogs] repository\n    to install a set of commonly used XML catalogs and schemas. Just set the\n    `xml_catalog_files` setting of this plugin to point to the `catalog.xml`\n    file in where you cloned the repo.\n\n    Alternatively, you can clone[`catalogs`][catalogs] into\n    `/etc/xml` and create `/etc/xml/catalog.xml` with this content:\n\n    ```xml\n    \u003ccatalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\"\u003e\n      \u003cnextCatalog catalog=\"catalogs/catalog.xml\"/\u003e\n    \u003c/catalog\u003e\n    ```\n\n    If you do that, you don't have to set the `xml_catalog_files` setting.\n\n    **NOTE**: If you change XML catalogs in any way, you need to restart\n    Sublime Text 3 for the changes to take effect.\n\n## Known issues\n\n- Due to libxml2 issues [#573483][libxml2-#573483], [#753970][libxml2-#753970],\n  and [#753997][libxml2-#753997], **none** of the available validation methods\n  work for DITA 1.3 files.\n- ISO Schematron validation doesn't always report the error position correctly.\n\n## Acknowledgements\n- Norman Walsh for his [RelaxNG grammars for XSLT stylesheets][ndw].\n- @hoest for [SublimeXSLT][sublimexslt], where I borrowed `XSLT.tmLanguage`\n  from.\n\n[dita]: https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture\n[dtd]: https://en.wikipedia.org/wiki/Document_type_definition\n[libxml2]: http://xmlsoft.org\n[libxml2-#573483]: https://bugzilla.gnome.org/show_bug.cgi?id=573483\n[libxml2-#753970]: https://bugzilla.gnome.org/show_bug.cgi?id=753970\n[libxml2-#753997]: https://bugzilla.gnome.org/show_bug.cgi?id=753997\n[lxml]: http://lxml.de\n[catalogs]: https://github.com/eerohele/catalogs\n[Boxy]: https://packagecontrol.io/packages/Boxy%20Theme\n[maven]: https://maven.apache.org\n[ndw]: https://github.com/ndw/xslt-relax-ng\n[package-control]: https://packagecontrol.io\n[py3]: https://www.python.org\n[rng]: http://relaxng.org\n[schematron]: http://schematron.com/\n[Sublime Text]: http://www.sublimetext.com/3\n[sublimexslt]: https://github.com/hoest/SublimeXSLT\n[w3c-dtd]: http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/\n[xml-catalog]: http://xmlsoft.org/catalog.html\n[xml-model]: http://www.w3.org/TR/xml-model\n[xsd]: http://www.w3.org/XML/Schema\n[xslt]: http://www.w3.org/standards/xml/transformation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerohele%2Fexalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feerohele%2Fexalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerohele%2Fexalt/lists"}