> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# XML schema catalog

> Download contract, token, and state-machine XSD files with exact namespaces and validation dependencies

Choose a schema by its exact namespace. Contract XML, token creation XML, and embedded state-machine XML use different namespaces, even when they appear in one file.

For specifications and further reference, see the [Neuro Foundation documentation](https://neuro-foundation.io/Index.md). For expressions inside contracts and state machines, see the [original Script reference](https://lab.tagroot.io/Script.md).

## Download the contract authoring schema set

| Schema                        | Exact namespace                                             | Local filename            | Original file                                                                                                                                                                          |
| ----------------------------- | ----------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Smart contracts               | `urn:nf:iot:leg:sc:1.0`                                     | `SmartContracts.xsd`      | [Download XSD](https://raw.githubusercontent.com/PeterWaher/IoTGateway/43705bab39e89da8f2e5e4d72c55cba6f2a43bbd/Networking/Waher.Networking.XMPP.Contracts/Schema/SmartContracts.xsd)  |
| Legal Identities              | `urn:nf:iot:leg:id:1.0`                                     | `LegalIdentities.xsd`     | [Download XSD](https://raw.githubusercontent.com/PeterWaher/IoTGateway/43705bab39e89da8f2e5e4d72c55cba6f2a43bbd/Networking/Waher.Networking.XMPP.Contracts/Schema/LegalIdentities.xsd) |
| Identity key formats          | `urn:nf:iot:e2e:1.0`                                        | `E2E.xsd`                 | [Download XSD](https://raw.githubusercontent.com/PeterWaher/IoTGateway/43705bab39e89da8f2e5e4d72c55cba6f2a43bbd/Networking/Waher.Networking.XMPP.Contracts/Schema/E2E.xsd)             |
| Imported peer address types   | `urn:nf:iot:p2p:1.0`                                        | `P2P.xsd`                 | [Download XSD](https://raw.githubusercontent.com/PeterWaher/IoTGateway/43705bab39e89da8f2e5e4d72c55cba6f2a43bbd/Networking/Waher.Networking.XMPP.Contracts/Schema/P2P.xsd)             |
| XML language attributes       | `http://www.w3.org/XML/1998/namespace`                      | `Xml.xsd`                 | [Download XSD](https://www.w3.org/2001/xml.xsd)                                                                                                                                        |
| Token contract operations     | `https://paiwise.tagroot.io/Schema/NeuroFeatures.xsd`       | `NeuroFeatures.xsd`       | [Download XSD](https://paiwise.tagroot.io/Schema/NeuroFeatures.xsd)                                                                                                                    |
| Token state machines          | `https://paiwise.tagroot.io/Schema/StateMachines.xsd`       | `StateMachines.xsd`       | [Download XSD](https://paiwise.tagroot.io/Schema/StateMachines.xsd)                                                                                                                    |
| Payment contract instructions | `https://paiwise.tagroot.io/Schema/PaymentInstructions.xsd` | `PaymentInstructions.xsd` | [Download XSD](https://paiwise.tagroot.io/Schema/PaymentInstructions.xsd)                                                                                                              |

## Validate a complete document

Use [the XML validation guide](/resources/validate-xml) to load all eight dependencies into your XML validator and check a complete document offline. Check state, action, and event references as a separate step. XML validation does not establish Script behavior, signature validity, provider approval, or live execution.

The [schema manifest](/downloads/xml-tools/schema-manifest.json) records exact revisions, SHA-256 checksums, and dependencies. Download the original publisher files above and compare their checksums. Consult the publisher's terms before redistributing their files.

## Understand the dependencies

The contract schema imports identity, key, and XML attribute definitions. Identity imports key definitions; the key schema imports peer-address types. These imports do not all contain file locations. Associate every namespace above with its local file in your validator; opening one XSD in isolation is insufficient.

The XML-attribute dependency uses the [W3C XML schema](https://www.w3.org/2001/xml.xsd). Load it alongside the other schema dependencies.

## Match the namespace to your service

This set uses `urn:nf:iot:leg:sc:1.0`. Other published material includes `urn:nfi:iot:leg:sc:1.0` and older `urn:ieee:iot:leg:sc:1.0` interfaces. They are distinct identifiers. Ask your provider which set its supported build accepts before submitting a template.

Local compilation of this set has been checked. Compatibility with your Neuron and approval of a particular template require separate verification.

## Additional LegalLab example schemas

Twelve gallery files also use one or more of these dependencies. The optional example set combines these five XSDs with the eight base schemas; all 42 pinned gallery files pass its local XML checks.

| Purpose                     | Exact namespace                                           | Local filename           | Original file                                                           |
| --------------------------- | --------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------- |
| BIM register example        | `https://lab.tagroot.io/Downloads/BimRegister.xsd`        | `BimRegister.xsd`        | [Download XSD](https://lab.tagroot.io/Downloads/BimRegister.xsd)        |
| Marketplace examples        | `https://paiwise.tagroot.io/Schema/Marketplace.xsd`       | `Marketplace.xsd`        | [Download XSD](https://paiwise.tagroot.io/Schema/Marketplace.xsd)       |
| Layout2D display content    | `http://waher.se/Schema/Layout2D.xsd`                     | `Layout2D.xsd`           | [Download XSD](https://waher.se/Schema/Layout2D.xsd)                    |
| Organization layout example | `https://lab.tagroot.io/Downloads/SimpleOrganization.xsd` | `SimpleOrganization.xsd` | [Download XSD](https://lab.tagroot.io/Downloads/SimpleOrganization.xsd) |
| Open vote examples          | `https://paiwise.tagroot.io/Schema/OpenVote.xsd`          | `OpenVote.xsd`           | [Download XSD](https://paiwise.tagroot.io/Schema/OpenVote.xsd)          |

Add these five schemas to the same local schema set as the eight base files, using the exact namespace-to-file associations above. The [additional dependency manifest](/downloads/xml-tools/example-schema-additions.json) pins the original bytes.

The organization schema imports Layout2D. Its namespace remains `http://waher.se/Schema/Layout2D.xsd` even though the file downloads over HTTPS. Never change a namespace merely to match the download protocol.

## Continue authoring

* [Author a custom schema](/resources/custom-schemas).
* [Look up contract elements](/resources/smart-contracts-reference).
* [Look up token creation elements](/resources/neuro-features-reference).
* [Look up state-machine elements](/resources/state-machines-reference).
* [Look up payment instruction elements](/resources/payment-instructions-reference).
* [Choose a LegalLab example](/resources/contract-examples).
* [Understand the contract data model](/contracts/data-model).
* [Define token state machines](/contracts/state-machines).
* [Write Neuron Script](/script/overview).
