You've already forked VARAM_classification_schema
Import UAPF package
396 lines
16 KiB
XML
396 lines
16 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
VDVC — Valsts dokumentu vadības klasifikators
|
|
Vienota dokumentu vadības klasifikācijas shēma
|
|
|
|
Namespace: urn:vdvc:classification:2026
|
|
Version: 1.0.0
|
|
Date: 2026-02-08
|
|
|
|
Supports two XML flavours from the same schema:
|
|
V1 (as-is) — 647 entries, flat tree, original codes normalised
|
|
V2 (proposed) — ~55 functional categories + metadata vocabularies
|
|
|
|
Decisions encoded:
|
|
Q1a programmeRef = internal short IDs (PRG-xxx)
|
|
Q1b projectRef = internal short IDs (PRJ-xxx)
|
|
Q1c departmentRef = internal dept codes, cross-ref to VARAM Org Register
|
|
Q2a V1 codes normalised (dots→hyphens)
|
|
Q2b NBSP retention = empty (omitted element)
|
|
Q3a conditional retention via retentionRule
|
|
Q3b retention on category-programme/project combination
|
|
Q3c V2 uses clean numeric domains: 1.x, 2.x, 3.x
|
|
Q5a MCP serves V2 only
|
|
Q5b generate_document uses clean structure
|
|
-->
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:vdvc="urn:vdvc:classification:2026"
|
|
targetNamespace="urn:vdvc:classification:2026"
|
|
elementFormDefault="qualified"
|
|
version="1.0.0">
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
ROOT ELEMENT
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:element name="classification" type="vdvc:ClassificationType"/>
|
|
|
|
<xs:complexType name="ClassificationType">
|
|
<xs:sequence>
|
|
<xs:element name="meta" type="vdvc:MetaType"/>
|
|
<xs:element name="vocabularies" type="vdvc:VocabulariesType" minOccurs="0"/>
|
|
<xs:element name="domains" type="vdvc:DomainsType"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="version" type="vdvc:VersionString" use="required"/>
|
|
<xs:attribute name="variant" type="vdvc:VariantType" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="VariantType">
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="v1-asis"/>
|
|
<xs:enumeration value="v2-proposed"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="VersionString">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="\d+\.\d+\.\d+"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
META — document-level metadata
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="MetaType">
|
|
<xs:sequence>
|
|
<xs:element name="organisation" type="xs:string"/>
|
|
<xs:element name="approvedBy" type="xs:string" minOccurs="0"/>
|
|
<xs:element name="approvedDate" type="xs:date" minOccurs="0"/>
|
|
<xs:element name="effectiveDate" type="xs:date"/>
|
|
<xs:element name="legalBasis" type="xs:string" minOccurs="0"/>
|
|
<xs:element name="sourceFile" type="xs:string" minOccurs="0"/>
|
|
<xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
VOCABULARIES — controlled value lists (V2 uses these)
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="VocabulariesType">
|
|
<xs:sequence>
|
|
<xs:element name="departments" type="vdvc:DepartmentListType" minOccurs="0"/>
|
|
<xs:element name="programmes" type="vdvc:ProgrammeListType" minOccurs="0"/>
|
|
<xs:element name="projects" type="vdvc:ProjectListType" minOccurs="0"/>
|
|
<xs:element name="audiences" type="vdvc:AudienceListType" minOccurs="0"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<!-- Department -->
|
|
<xs:complexType name="DepartmentListType">
|
|
<xs:sequence>
|
|
<xs:element name="department" type="vdvc:DepartmentType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="DepartmentType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="nmrCode" type="xs:string" minOccurs="0">
|
|
<xs:annotation>
|
|
<xs:documentation>Cross-reference to VARAM Organizations Register NMR code</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
</xs:sequence>
|
|
<xs:attribute name="id" type="vdvc:DeptCode" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="DeptCode">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="[A-Z]{2,10}"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<!-- Programme -->
|
|
<xs:complexType name="ProgrammeListType">
|
|
<xs:sequence>
|
|
<xs:element name="programme" type="vdvc:ProgrammeType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="ProgrammeType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="officialCode" type="xs:string" minOccurs="0">
|
|
<xs:annotation>
|
|
<xs:documentation>Official EU programme code for reference</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="period" type="xs:string" minOccurs="0"/>
|
|
<xs:element name="v1Code" type="xs:string" minOccurs="0">
|
|
<xs:annotation>
|
|
<xs:documentation>Original V1 code prefix (e.g. I1-1) for migration mapping</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
</xs:sequence>
|
|
<xs:attribute name="id" type="vdvc:ProgrammeCode" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="ProgrammeCode">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="PRG-\d{3}"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<!-- Project -->
|
|
<xs:complexType name="ProjectListType">
|
|
<xs:sequence>
|
|
<xs:element name="project" type="vdvc:ProjectType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="ProjectType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="officialNumber" type="xs:string" minOccurs="0">
|
|
<xs:annotation>
|
|
<xs:documentation>Official project number from EU/national registry</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
<xs:element name="programmeRef" type="vdvc:ProgrammeCode" minOccurs="0"/>
|
|
<xs:element name="v1Code" type="xs:string" minOccurs="0">
|
|
<xs:annotation>
|
|
<xs:documentation>Original V1 code prefix (e.g. I2-5) for migration mapping</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
</xs:sequence>
|
|
<xs:attribute name="id" type="vdvc:ProjectCode" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="ProjectCode">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="PRJ-\d{3}"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<!-- Audience (for correspondence sub-types) -->
|
|
<xs:complexType name="AudienceListType">
|
|
<xs:sequence>
|
|
<xs:element name="audience" type="vdvc:AudienceType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="AudienceType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="id" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
DOMAINS AND CATEGORIES
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="DomainsType">
|
|
<xs:sequence>
|
|
<xs:element name="domain" type="vdvc:DomainType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="DomainType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="group" type="vdvc:GroupType" maxOccurs="unbounded"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="code" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="GroupType">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="category" type="vdvc:CategoryType" minOccurs="0" maxOccurs="unbounded"/>
|
|
<xs:element name="group" type="vdvc:GroupType" minOccurs="0" maxOccurs="unbounded">
|
|
<xs:annotation>
|
|
<xs:documentation>Nested sub-groups (V1 uses deeper nesting)</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
</xs:sequence>
|
|
<xs:attribute name="code" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="CategoryType">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
A leaf-level document category that can be assigned to documents.
|
|
In V1 this is the deepest code. In V2 this is a functional category.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="description" type="xs:string" minOccurs="0"/>
|
|
|
|
<!-- Retention: exactly one of these retention models -->
|
|
<xs:element name="retention" type="vdvc:RetentionType" minOccurs="0"/>
|
|
|
|
<!-- Conditional retention (V2: Q3a) — used when retention varies by metadata -->
|
|
<xs:element name="retentionRule" type="vdvc:RetentionRuleType" minOccurs="0" maxOccurs="unbounded">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Conditional retention: different terms based on audience, programme, or project.
|
|
Q3a: P-1-13 correspondence uses audience-based rules.
|
|
Q3b: I1/I2 categories use programme/project-based retention overrides.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<!-- Department(s) responsible -->
|
|
<xs:element name="departmentRef" type="vdvc:DeptCode" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
|
<!-- Metadata tag slots (V2 only) -->
|
|
<xs:element name="requiresTag" type="vdvc:TagRequirementType" minOccurs="0" maxOccurs="unbounded">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Declares that this category requires metadata when assigned to a document.
|
|
V1 does not use this. V2 uses it for programme/project/audience tags.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:element>
|
|
|
|
<!-- Media type -->
|
|
<xs:element name="media" type="xs:string" minOccurs="0"/>
|
|
<!-- Information system -->
|
|
<xs:element name="system" type="xs:string" minOccurs="0"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="code" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
RETENTION TYPES
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="RetentionType">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
Normalised retention. 50+ original variants → 5 structured types:
|
|
permanent, duration, triggerDuration, fixedDate, conditional.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:choice>
|
|
<xs:element name="permanent">
|
|
<xs:complexType/>
|
|
</xs:element>
|
|
<xs:element name="duration" type="vdvc:DurationType"/>
|
|
<xs:element name="fixedDate" type="vdvc:FixedDateType"/>
|
|
<xs:element name="untilReplaced">
|
|
<xs:annotation>
|
|
<xs:documentation>"Līdz nomaiņai" — until superseded</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexType/>
|
|
</xs:element>
|
|
<xs:element name="untilNoLongerNeeded">
|
|
<xs:annotation>
|
|
<xs:documentation>"Līdz beidzas nepieciešamība"</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexType/>
|
|
</xs:element>
|
|
</xs:choice>
|
|
<xs:attribute name="original" type="xs:string">
|
|
<xs:annotation>
|
|
<xs:documentation>Original retention text from Excel for audit trail</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="DurationType">
|
|
<xs:attribute name="years" type="xs:positiveInteger" use="required"/>
|
|
<xs:attribute name="trigger" type="vdvc:TriggerType" use="optional">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
When does the retention period START counting?
|
|
If omitted = from document creation date.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="TriggerType">
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="creation"/>
|
|
<xs:enumeration value="project_closure"/>
|
|
<xs:enumeration value="programme_closure"/>
|
|
<xs:enumeration value="contract_end"/>
|
|
<xs:enumeration value="employment_end"/>
|
|
<xs:enumeration value="replacement"/>
|
|
<xs:enumeration value="assessment"/>
|
|
<xs:enumeration value="last_debt_cleared"/>
|
|
<xs:enumeration value="description_complete"/>
|
|
<xs:enumeration value="procurement_execution"/>
|
|
<xs:enumeration value="procurement_signing"/>
|
|
<xs:enumeration value="disciplinary_decision"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:complexType name="FixedDateType">
|
|
<xs:simpleContent>
|
|
<xs:extension base="xs:date">
|
|
<xs:attribute name="euCommission" type="xs:boolean" default="false">
|
|
<xs:annotation>
|
|
<xs:documentation>True if date is set by EU Commission requirement (EK)</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:extension>
|
|
</xs:simpleContent>
|
|
</xs:complexType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
CONDITIONAL RETENTION (V2)
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="RetentionRuleType">
|
|
<xs:annotation>
|
|
<xs:documentation>
|
|
A retention rule that applies when specific metadata conditions are met.
|
|
Q3a: audience-based for correspondence.
|
|
Q3b: programme/project-based for I1/I2 categories.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:sequence>
|
|
<xs:element name="condition" type="vdvc:ConditionType"/>
|
|
<xs:element name="retention" type="vdvc:RetentionType"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="label" type="xs:string">
|
|
<xs:annotation>
|
|
<xs:documentation>Human-readable label for this rule</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:attribute>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="ConditionType">
|
|
<xs:choice>
|
|
<xs:element name="audienceRef" type="xs:string"/>
|
|
<xs:element name="programmeRef" type="vdvc:ProgrammeCode"/>
|
|
<xs:element name="projectRef" type="vdvc:ProjectCode"/>
|
|
<xs:element name="departmentRef" type="vdvc:DeptCode"/>
|
|
<xs:element name="default">
|
|
<xs:annotation>
|
|
<xs:documentation>Default retention when no specific rule matches</xs:documentation>
|
|
</xs:annotation>
|
|
<xs:complexType/>
|
|
</xs:element>
|
|
</xs:choice>
|
|
</xs:complexType>
|
|
|
|
<!-- ════════════════════════════════════════════════════════
|
|
TAG REQUIREMENTS (V2)
|
|
════════════════════════════════════════════════════════ -->
|
|
<xs:complexType name="TagRequirementType">
|
|
<xs:attribute name="type" type="vdvc:TagType" use="required"/>
|
|
<xs:attribute name="required" type="xs:boolean" default="true"/>
|
|
<xs:attribute name="description" type="xs:string"/>
|
|
</xs:complexType>
|
|
|
|
<xs:simpleType name="TagType">
|
|
<xs:restriction base="xs:string">
|
|
<xs:enumeration value="programme"/>
|
|
<xs:enumeration value="project"/>
|
|
<xs:enumeration value="audience"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
</xs:schema>
|