--- title: xs:positiveInteger - X4 schema type summary: xs:positiveInteger: An integer strictly greater than zero. 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:positiveInteger: An integer strictly greater than zero. 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` | | Base type | [`xs:nonNegativeInteger`](wiki:schema-xs-nonnegativeinteger-bbdb0370) | | Constraint | Value | | --- | --- | | `minInclusive` | `1` | 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 1 ``` **What happens:** 1 satisfies this base type; 0 does not. 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 | | --- | --- | --- | | [`patch`](wiki:api-md-patch-bce83b45) | `sinceversion` | `libraries/aiscripts.xsd` | | [`patch`](wiki:api-md-patch-bce83b45) | `sinceversion` | `libraries/md.xsd` | | [`select`](wiki:api-md-select-7d56c04d) | `max` | `libraries/drops.xsd` | | [`select`](wiki:api-md-select-7d56c04d) | `exact` | `libraries/drops.xsd` | | [`speak`](wiki:api-md-speak-8298e787) | `page` | `libraries/voicesequences.xsd` | | [`speak`](wiki:api-md-speak-8298e787) | `line` | `libraries/voicesequences.xsd` | [All schema types](wiki:schema-types) ยท [Lua / MD value types](wiki:types)