> For the complete documentation index, see [llms.txt](https://help.santesuite.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.santesuite.org/developers/santedb-xml-schemas.md).

# SanteDB XML Schemas

When editing an asset in SanteDB which is in XML format, the use of an XML Schema can greatly assist the development process. The SanteDB community provides schemas for developers to use in their XML files at `http://santedb.org/schema/v3.0`or `http://santedb.org/schema/v2.2`.

## Schemas

The schema location in the table below assumes a root of `http://santedb.org/schema/v3.0/`for example `http://santedb.org/schema/v3.0/Applet.xsd`would reference the applet manifest schema.

| Schema Location            | Uses                                                                                                                                                                                          |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Applet.xsd`               | Applet Manifest (`manifest.xml`) - [Applet Structure](/developers/applets/applet-structure.md#manifest-file)                                                                                  |
| `Audit.xsd`                | HDSI format Audit messages                                                                                                                                                                    |
| `BusinessIntelligence.xsd` | Any BI asset: `BiIndicatorDefinition`, `BiQueryDefinition`, `BiViewDefinition`, `BiReportDefinition` - [Business Intelligence Assets](/developers/applets/business-intelligence-bi-assets.md) |
| `Cdss.xsd`                 | Clinical Decision Support rules expressed in XML - [CDSS Definitions](/developers/applets/cdss-protocols/cdss-definitions.md)                                                                 |
| `Dataset.xsd`              | Any dataset file (seeding data) [Dataset Files](/developers/applets/distributing-data.md)                                                                                                     |
| `DetectedIssue.xsd`        | HDSI format detected issue templates                                                                                                                                                          |
| `ForeignData.xsd`          | Any Foreign Data Map definition file ( [External Data Maps](/developers/applets/external-data-maps.md))                                                                                       |
| `MatcherDefinition.xsd`    | Any match configuration file - [Matching Engine](/santedb/matching-engine.md)                                                                                                                 |
| `ModelMap.xsd`             | For .NET plugins where a persistence layer (physical layer) class definition must be mapped to a business layer object.                                                                       |
| `ViewModelDescription.xsd` | For defining view model definition files which control how the HDSI - [Health Data Service Interface (HDSI)](/developers/service-apis/health-data-service-interface-hdsi.md#viewmodel-json)   |

## Referencing Schemas

To reference a schema in your XML file, simply:

* Declare the `http://www.w3.org/2001/XMLSchema-instance`namespace on your root element
* Use the `xsi:schemaLocation`attribute to point to the intended schema

For example, if defining BI Indicator:

```xml
<BiIndicatorDefinition 
    xmlns="http://santedb.org/bi"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://santedb.org/bi http://santedb.org/schema/v3.0/BusinessIntelligence.xsd"
    id="org.example.indicator"
    name="Example Indicator"
    label="ui.org.example.indicator.label">
</BiIndicatorDefinition>
```
