--- title: xs:string - X4 schema type summary: xs:string: An XML Schema text value. Derived MD types may further restrict expression syntax. section: reference kind: guide status: reference updated: 2026-10-27 tags: ["XSD","schema","types"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/","https://www.w3.org/TR/xmlschema11-2/"] --- ## Meaning xs:string: An XML Schema text value. Derived MD types may further restrict expression syntax. An XSD type constrains XML, rather than declaring a Lua return or the payload type of event.param. A valid schema value does not prove a successful game effect. ## Schema structure `W3C XML Schema` | Property | Value | | --- | --- | | Construction | `builtin` | restriction narrows a base type; union accepts one of its branches; list describes whitespace-separated items. Enumeration values in one restriction are alternatives. Pattern syntax is XML Schema regex, not Lua patterns or JavaScript RegExp. Constraints inherited from the base type still apply. ## Example and result ```text Example text ``` **What happens:** This is a text value; its receiving attribute determines further meaning. Object and group variables must already exist in the correct MD / AI context. These are learning fragments, not a complete runnable mission. ## Used by | Element | Attribute | Schema | | --- | --- | --- | | [`engine`](wiki:api-md-engine-0d7c15a7) | `ware` | `libraries/gamestarts.xsd` | | [`level`](wiki:api-md-level-f1dfe606) | `name` | `libraries/diplomacy.xsd` | | [`level`](wiki:api-md-level-f1dfe606) | `icon` | `libraries/diplomacy.xsd` | | [`level`](wiki:api-md-level-f1dfe606) | `name` | `libraries/parameters.xsd` | | [`loadout`](wiki:api-md-loadout-611d5840) | `ref` | `libraries/gamestarts.xsd` | | [`owner`](wiki:api-md-owner-85a24084) | `factions` | `libraries/unlocks.xsd` | | [`pilot`](wiki:api-md-pilot-bf4d4c22) | `name` | `libraries/gamestarts.xsd` | | [`pilot`](wiki:api-md-pilot-bf4d4c22) | `tags` | `libraries/gamestarts.xsd` | | [`result`](wiki:api-md-result-9e058700) | `text` | `libraries/diplomacy.xsd` | | [`speak`](wiki:api-md-speak-8298e787) | `filter` | `libraries/voicesequences.xsd` | | [`weapon`](wiki:api-md-weapon-63ca2303) | `ware` | `libraries/gamestarts.xsd` | | [`weapon`](wiki:api-md-weapon-63ca2303) | `context` | `libraries/gamestarts.xsd` | | [`weapon`](wiki:api-md-weapon-63ca2303) | `group` | `libraries/gamestarts.xsd` | [All schema types](wiki:schema-types) ยท [Lua / MD value types](wiki:types)