1
0

Upload files to "/"

This commit is contained in:
2026-02-08 22:13:10 +00:00
parent e0c0bfad27
commit 6f8289b9e8
2 changed files with 880 additions and 0 deletions

485
index.html Normal file
View File

@@ -0,0 +1,485 @@
<!DOCTYPE html>
<html lang="lv">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VDVC — Klasifikācijas shēmas redaktors</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');
:root {
--bg:#f0f2f5;--surface:#fff;--border:#d0d5dd;--text:#1d2939;--text2:#475467;--text3:#98a2b3;
--blue:#1570ef;--blue-bg:#eff8ff;--blue-border:#b2ddff;--green:#12b76a;--green-bg:#ecfdf3;
--orange:#f79009;--orange-bg:#fffaeb;--red:#f04438;--purple:#7a5af8;--purple-bg:#f4f3ff;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Source Sans 3',-apple-system,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}
.header{background:#0c111d;color:#fff;padding:14px 20px;display:flex;align-items:center;gap:14px}
.header h1{font-size:17px;font-weight:600}
.header .sub{color:#98a2b3;font-size:13px}
.logo{width:32px;height:32px;background:var(--blue);border-radius:6px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;color:#fff}
.tabs{background:var(--surface);border-bottom:1px solid var(--border);display:flex;padding:0 20px;gap:0}
.tab{padding:10px 16px;font-size:13px;font-weight:600;color:var(--text2);cursor:pointer;border-bottom:2px solid transparent}
.tab:hover{color:var(--text)}.tab.active{color:var(--blue);border-bottom-color:var(--blue)}
.badge{display:inline-block;background:var(--bg);border-radius:8px;padding:1px 7px;font-size:11px;margin-left:4px;font-weight:600}
.tab.active .badge{background:var(--blue-bg);color:var(--blue)}
.content{padding:20px;max-width:1200px;margin:0 auto}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:16px}
.panel-hdr{padding:12px 16px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.panel-hdr h2{font-size:15px;font-weight:700}
.panel-body{padding:16px}
.v-badge{font-size:11px;padding:2px 8px;border-radius:5px;font-weight:600}
.v1-b{background:var(--orange-bg);color:var(--orange)}.v2-b{background:var(--green-bg);color:var(--green)}
.search{width:100%;padding:8px 12px;border:1px solid var(--border);border-radius:6px;font-size:13px;font-family:inherit;margin-bottom:8px}
.search:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 2px rgba(21,112,239,.1)}
.tree{max-height:500px;overflow-y:auto;font-size:13px}
.tree::-webkit-scrollbar{width:5px}.tree::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
.node{padding:5px 10px;cursor:pointer;display:flex;gap:6px;align-items:flex-start;border-left:2px solid transparent}
.node:hover{background:var(--bg)}.node.sel{background:var(--blue-bg);border-left-color:var(--blue)}
.node.grp{font-weight:600;color:var(--text2);cursor:default;background:transparent}
.node .code{font-family:'SF Mono',Consolas,monospace;font-size:11px;color:var(--text3);min-width:60px;flex-shrink:0}
.node .nm{flex:1}.node .ret{font-size:11px;color:var(--text3);white-space:nowrap}
.node .tag-ind{font-size:10px;padding:1px 5px;border-radius:3px;font-weight:600}
.tag-prj{background:#ecfeff;color:#0086c9}.tag-prg{background:var(--purple-bg);color:var(--purple)}.tag-aud{background:#fff6ed;color:#c4320a}
.d0{padding-left:10px}.d1{padding-left:26px}.d2{padding-left:42px}.d3{padding-left:58px}
.counter{padding:6px 10px;font-size:11px;color:var(--text3);background:var(--bg);border-top:1px solid var(--border)}
.detail{margin-top:12px;padding:14px;background:var(--bg);border-radius:8px;font-size:13px;display:none}
.detail.show{display:block}
.detail h3{font-size:14px;margin-bottom:8px}.detail .row{margin-bottom:6px}
.detail .lbl{font-weight:600;color:var(--text2);min-width:120px;display:inline-block}
.detail .val{color:var(--text)}
.detail .rule{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:8px 10px;margin:4px 0;font-size:12px}
.btn{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text)}
.btn:hover{background:var(--bg)}.btn-p{background:var(--blue);color:#fff;border-color:var(--blue)}.btn-p:hover{background:#1260cc}
.btn-sm{padding:4px 10px;font-size:12px}
.btn-row{display:flex;gap:8px;margin-top:12px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-bottom:16px}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px;text-align:center}
.stat .n{font-size:24px;font-weight:700}.stat .l{font-size:11px;color:var(--text2)}
.stat.good .n{color:var(--green)}.stat.bad .n{color:var(--red)}.stat.neu .n{color:var(--blue)}
.hidden{display:none}
table{width:100%;border-collapse:collapse;font-size:12px;margin-top:8px}
th,td{padding:6px 8px;text-align:left;border-bottom:1px solid var(--border)}
th{background:var(--bg);font-weight:600;color:var(--text2)}
</style>
</head>
<body>
<div class="header">
<div class="logo">DVS</div>
<div><h1>VDVC — Klasifikācijas shēmas redaktors</h1><div class="sub">Display V1 (read-only) · Edit V2 (proposed)</div></div>
</div>
<div class="tabs">
<div class="tab active" onclick="showTab('v2')">V2 Ierosinātā <span class="badge">edit</span></div>
<div class="tab" onclick="showTab('v1')">V1 Pašreizējā <span class="badge">view</span></div>
<div class="tab" onclick="showTab('vocab')">Vārdnīcas <span class="badge">edit</span></div>
<div class="tab" onclick="showTab('export')">Eksports</div>
</div>
<div class="content">
<!-- V2 Tab -->
<div id="tab-v2">
<div class="stats">
<div class="stat good"><div class="n" id="v2-cat-count">0</div><div class="l">Kategorijas</div></div>
<div class="stat neu"><div class="n" id="v2-grp-count">0</div><div class="l">Grupas</div></div>
<div class="stat neu"><div class="n" id="v2-rule-count">0</div><div class="l">Nosacījumu noteikumi</div></div>
<div class="stat neu"><div class="n">3</div><div class="l">Domēni</div></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>V2 Kategoriju koks</h2><span class="v-badge v2-b">PROPOSED</span></div>
<div class="panel-body">
<input class="search" placeholder="Meklēt kategorijās..." oninput="filterTree('v2',this.value)">
<div class="tree" id="v2-tree"></div>
<div class="counter" id="v2-counter"></div>
</div>
</div>
<div class="detail" id="v2-detail"></div>
</div>
<!-- V1 Tab -->
<div id="tab-v1" class="hidden">
<div class="stats">
<div class="stat bad"><div class="n" id="v1-cat-count">0</div><div class="l">Kategorijas</div></div>
<div class="stat neu"><div class="n" id="v1-grp-count">0</div><div class="l">Grupas</div></div>
<div class="stat bad"><div class="n">50+</div><div class="l">Glabāšanas varianti</div></div>
<div class="stat neu"><div class="n">3</div><div class="l">Domēni</div></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>V1 Kategoriju koks (tikai skatīšanai)</h2><span class="v-badge v1-b">AS-IS · READ-ONLY</span></div>
<div class="panel-body">
<input class="search" placeholder="Meklēt 493 kategorijās..." oninput="filterTree('v1',this.value)">
<div class="tree" id="v1-tree"></div>
<div class="counter" id="v1-counter"></div>
</div>
</div>
<div class="detail" id="v1-detail"></div>
</div>
<!-- Vocabularies Tab -->
<div id="tab-vocab" class="hidden">
<div class="stats">
<div class="stat neu"><div class="n">22</div><div class="l">Departamenti</div></div>
<div class="stat neu"><div class="n">13</div><div class="l">Programmas</div></div>
<div class="stat neu"><div class="n">33</div><div class="l">Projekti</div></div>
<div class="stat neu"><div class="n">9</div><div class="l">Auditorijas</div></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>Departamenti</h2></div>
<div class="panel-body"><table id="dept-table"><thead><tr><th>Kods</th><th>Nosaukums</th><th>NMR</th></tr></thead><tbody></tbody></table></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>Investīciju programmas</h2></div>
<div class="panel-body"><table id="prog-table"><thead><tr><th>ID</th><th>Nosaukums</th><th>V1 kods</th></tr></thead><tbody></tbody></table></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>Investīciju projekti</h2></div>
<div class="panel-body"><table id="proj-table"><thead><tr><th>ID</th><th>Nosaukums</th><th>V1 kods</th></tr></thead><tbody></tbody></table></div>
</div>
<div class="panel">
<div class="panel-hdr"><h2>Auditorijas (sarakstei)</h2></div>
<div class="panel-body"><table id="aud-table"><thead><tr><th>ID</th><th>Nosaukums</th></tr></thead><tbody></tbody></table></div>
</div>
</div>
<!-- Export Tab -->
<div id="tab-export" class="hidden">
<div class="panel">
<div class="panel-hdr"><h2>Eksportēt XML failus</h2></div>
<div class="panel-body">
<p style="font-size:14px;color:var(--text2);margin-bottom:16px">Lejupielādēt XML failus manuālai augšupielādei ProcessGit repozitorijā.</p>
<div class="btn-row">
<button class="btn btn-p" onclick="downloadXML('v2')">⬇ classification-v2-proposed.xml</button>
<button class="btn" onclick="downloadXML('v1')">⬇ classification-v1-asis.xml</button>
<button class="btn" onclick="downloadXML('vocab')">⬇ vocabularies.xml</button>
</div>
<div style="margin-top:20px;padding:12px;background:var(--bg);border-radius:8px;font-size:13px">
<b>ProcessGit commit:</b><br>
1. Lejupielādēt XML failus<br>
2. Atvērt <code>VARAM/Document_classification_schema</code> repozitoriju<br>
3. Augšupielādēt un izveidot commit
</div>
</div>
</div>
</div>
</div>
<script>
// ══════════════════════════════════════════════════════════
// DATA — embedded from generated XMLs
// ══════════════════════════════════════════════════════════
const V2_DATA = [
{code:"1",name:"Pārvalde",level:0,group:true},
{code:"1.1",name:"Iestādes vadība",level:1,group:true},
{code:"1.1.1",name:"Nolikums/reglaments, struktūrvienību reglamenti",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.2",name:"Rīkojumi pamatdarbības jautājumos",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.3",name:"Iekšējie normatīvie akti un metodiskie dokumenti",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.4",name:"Publiskais gada pārskats, darba plāni",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.5",name:"Dienesta ziņojumi, rezolūcijas",level:2,ret:"5 gadi",dept:["LN"]},
{code:"1.1.6",name:"Ministrijas padomes sēžu protokoli",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.7",name:"Komisiju sēžu protokoli",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.8",name:"Darba grupu protokoli un dokumenti",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"1.1.9",name:"Pilnvaras un lēmumi",level:2,ret:"Pastāvīgi",dept:["VARAM"]},
{code:"1.1.10",name:"Trauksmes cēlēju ziņojumi",level:2,ret:"10 gadi",dept:["KD"]},
{code:"1.1.11",name:"Informācijas drošības dokumenti",level:2,ret:"5 gadi",dept:["VARAM"]},
{code:"1.1.12",name:"Personas datu apstrādes reģistri",level:2,ret:"Pastāvīgi",dept:["VARAM"]},
{code:"1.1.13",name:"Sarakste",level:2,ret:"5 gadi (noklusējums)",dept:["LN"],tags:["audience"],
rules:[
{label:"Republikas iestādes",condition:"audience:republic-orgs",ret:"Pastāvīgi"},
{label:"Valsts pārvaldes, fiziskas/juridiskas personas",condition:"audience:state-admin-public",ret:"5 gadi"},
{label:"Ārvalstu institūcijas",condition:"audience:foreign-institutions",ret:"Pastāvīgi"},
{label:"Struktūrvienības (iekšējā)",condition:"audience:internal-units",ret:"5 gadi"},
{label:"Dienesta vajadzībām",condition:"audience:state-admin-official",ret:"5 gadi"},
{label:"Informācijas drošība / datu aizsardzība",condition:"audience:infosec-dataprotection",ret:"5 gadi"},
{label:"Fizisko personu iesniegumi",condition:"audience:citizen-submissions",ret:"3 gadi"},
{label:"Kapitālsabiedrības",condition:"audience:capital-companies",ret:"5 gadi"},
{label:"Valsts noslēpums",condition:"audience:state-secret",ret:"5 gadi"},
]},
{code:"1.2",name:"Budžeta plānošana",level:1,group:true},
{code:"1.2.1",name:"Budžeta pieprasījumi un tāmes",level:2,ret:"Pastāvīgi",dept:["BFD"]},
{code:"1.2.2",name:"Apropriācijas izmaiņu dokumenti",level:2,ret:"5 gadi",dept:["BFD"]},
{code:"1.3",name:"Personālvadība",level:1,group:true},
{code:"1.3.1",name:"Rīkojumi personāla jautājumos",level:2,ret:"75 gadi",dept:["PN"]},
{code:"1.3.2",name:"Darba līgumi",level:2,ret:"75 gadi",dept:["PN"]},
{code:"1.3.3",name:"Personāla lietas",level:2,ret:"75 gadi",dept:["PN"]},
{code:"1.4",name:"Saimnieciskie jautājumi",level:1,group:true},
{code:"1.4.1",name:"Īpašuma un telpu dokumenti",level:2,ret:"Pastāvīgi",dept:["SAN"]},
{code:"1.5",name:"Iepirkumi",level:1,group:true},
{code:"1.5.1",name:"Iepirkumu dokumentācija",level:2,ret:"10 gadi",dept:["IUD"]},
{code:"1.5.2",name:"Līgumi un akti",level:2,ret:"10 gadi",dept:["IUD"]},
{code:"1.6",name:"Juridiskā funkcija",level:1,group:true},
{code:"1.6.1",name:"Tiesvedības dokumenti un atzinumi",level:2,ret:"10 gadi",dept:["JD"]},
{code:"1.7",name:"Iestādes komunikācija",level:1,group:true},
{code:"1.7.1",name:"Preses relīzes un publikācijas",level:2,ret:"Pastāvīgi",dept:["KD"]},
{code:"1.8",name:"Audita funkcija",level:1,group:true},
{code:"1.8.1",name:"Audita ziņojumi",level:2,ret:"10 gadi",dept:["AD"]},
{code:"1.9",name:"Finanšu vadība",level:1,group:true},
{code:"1.9.1",name:"Grāmatvedības dokumenti",level:2,ret:"10 gadi",dept:["BFD"]},
{code:"1.9.2",name:"Gada pārskati",level:2,ret:"Pastāvīgi",dept:["BFD"]},
// Domain 2
{code:"2",name:"Investīciju programmu vadība",level:0,group:true},
{code:"2.1",name:"Programmu plānošana",level:1,group:true},
{code:"2.1.1",name:"Programmu plānošanas dokumenti un sarakste",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.1.2",name:"Ārējie normatīvie dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.2",name:"Ieviešana un uzraudzība",level:1,group:true},
{code:"2.2.1",name:"Uzraudzības komiteju protokoli",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.2.2",name:"Ieviešanas un uzraudzības dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.3",name:"Iekšējā kontrole",level:1,group:true},
{code:"2.3.1",name:"Iekšējās kontroles sistēmas dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.4",name:"Risku un interešu konfliktu pārvaldība",level:1,group:true},
{code:"2.4.1",name:"Risku pārvaldības dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.4.2",name:"Interešu konfliktu un krāpšanas novēršanas dok.",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.5",name:"Finanšu pārvaldība",level:1,group:true},
{code:"2.5.1",name:"Tehniskās palīdzības dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.6",name:"Tiesiskais regulējums",level:1,group:true},
{code:"2.6.1",name:"SAM/SAMP līmeņa dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.7",name:"Komercdarbības atbalsts",level:1,group:true},
{code:"2.7.1",name:"Komercdarbības atbalsta dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.8",name:"Projektu atlase un vērtēšana",level:1,group:true},
{code:"2.8.1",name:"Projektu atlašu un vērtēšanas dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.9",name:"Projektu uzraudzība",level:1,group:true},
{code:"2.9.1",name:"Projektu uzraudzības dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.10",name:"Auditu koordinācija",level:1,group:true},
{code:"2.10.1",name:"Iekšējo un ārējo auditu dokumenti",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.11",name:"Informācija un komunikācija",level:1,group:true},
{code:"2.11.1",name:"Informācijas un komunikācijas pasākumu dok.",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
{code:"2.12",name:"Horizontālie principi",level:1,group:true},
{code:"2.12.1",name:"Ilgtspējīgas attīstības uzraudzības dok.",level:2,ret:"Pastāvīgi",dept:["IPD"],tags:["programme"]},
// Domain 3
{code:"3",name:"Investīciju projektu ieviešana",level:0,group:true},
{code:"3.1",name:"Korespondence",level:1,ret:"5 gadi pēc projekta noslēguma",dept:["PPD"],tags:["project"],
rules:[{label:"PRJ-001 (INTERREG BSR)",condition:"project:PRJ-001",ret:"Pastāvīgi"},
{label:"PRJ-002 (Green LUPO)",condition:"project:PRJ-002",ret:"2034-04-30"},
{label:"PRJ-003 (Jūras telpiskā plānošana)",condition:"project:PRJ-003",ret:"2026-12-31"},
{label:"PRJ-004 (SaskaņOST)",condition:"project:PRJ-004",ret:"2032-12-31"}]},
{code:"3.2",name:"Līgumi, grozījumi, pieņemšanas-nodošanas akti",level:1,ret:"5 gadi pēc projekta noslēguma",dept:["PPD"],tags:["project"]},
{code:"3.3",name:"Rīkojumi un protokoli",level:1,ret:"5 gadi pēc projekta noslēguma",dept:["PPD"],tags:["project"]},
{code:"3.4",name:"Komunikācijas materiāli un citi dokumenti",level:1,ret:"5 gadi pēc projekta noslēguma",dept:["PPD"],tags:["project"]},
];
// V1 data - representative sample (full version loaded from XML)
const V1_DATA = [
{code:"P",name:"PĀRVALDE",level:0,group:true},
{code:"P-1",name:"Iestādes vadība",level:1,group:true},
{code:"P-1-1",name:"Nolikums/reglaments, struktūrvienību reglamenti",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-2",name:"Rīkojumi pamatdarbības jautājumos",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-3",name:"Iekšējie normatīvie akti un metodiskie dokumenti",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-4",name:"Publiskais gada pārskats, darba plāni",level:2,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-5",name:"Dienesta ziņojumi, rezolūcijas",level:2,ret:"5 gadi",dept:["LN"]},
{code:"P-1-13",name:"Sarakste",level:2,group:true},
{code:"P-1-13-1",name:"Sarakste ar republikas iestādēm un organizācijām",level:3,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-13-2",name:"Sarakste ar valsts pārvaldes iestādēm, fiziskām un juridiskām personām",level:3,ret:"5 gadi",dept:["LN"]},
{code:"P-1-13-3",name:"Sarakste ar ārvalstu institūcijām",level:3,ret:"Pastāvīgi",dept:["LN"]},
{code:"P-1-13-4",name:"Sarakste starp struktūrvienībām",level:3,ret:"5 gadi",dept:["LN"]},
{code:"P-1-13-5",name:"Sarakste dienesta vajadzībām",level:3,ret:"5 gadi",dept:["KD","LN"]},
{code:"P-1-13-6",name:"Sarakste informācijas drošības jautājumos",level:3,ret:"5 gadi",dept:["VARAM"]},
{code:"P-1-13-7",name:"Fizisko personu iesniegumi",level:3,ret:"3 gadi",dept:["LN"]},
{code:"P-1-13-8",name:"Sarakste ar kapitālsabiedrībām",level:3,ret:"5 gadi",dept:["JD"]},
{code:"P-1-13-9",name:"Sarakste par valsts noslēpumu",level:3,ret:"5 gadi",dept:["KD","LN"]},
{code:"...",name:"... vēl ~120 P kategorijas ...",level:1,group:true},
{code:"I1",name:"INVESTĪCIJU PROGRAMMU VADĪBA",level:0,group:true},
{code:"I1-1",name:"ES fondu 2014.-2020. plānošanas periods",level:1,group:true},
{code:"I1-1-1",name:"Plānošanas dokumenti",level:2,group:true},
{code:"I1-1-1-1",name:"Sarakste par plānošanas dokumentiem",level:3,ret:"Pastāvīgi",dept:["IPD"]},
{code:"I1-1-1-2",name:"Ārējie dokumenti",level:3,ret:"Pastāvīgi",dept:["IPD"]},
{code:"I1-1-2",name:"Ieviešanas un uzraudzības dok.",level:2,group:true},
{code:"I1-1-2-1",name:"Uzraudzības komitejas dok.",level:3,ret:"Pastāvīgi",dept:["IPD"]},
{code:"...",name:"... 13 programmas × 13 funkcijas = ~227 kat. ...",level:1,group:true},
{code:"I2",name:"INVESTĪCIJU PROJEKTU IEVIEŠANA",level:0,group:true},
{code:"I2-1",name:'INTERREG BSR 2021.-2027. projekta dok.',level:1,group:true},
{code:"I2-1-1",name:"Korespondence",level:2,ret:"Patstāvīgi",dept:["PPD"]},
{code:"I2-1-2",name:"Līgumi, grozījumi, akti, rēķini",level:2,ret:"Patstāvīgi",dept:["PPD"]},
{code:"I2-1-3",name:"Rīkojumi, protokoli",level:2,ret:"Patstāvīgi",dept:["PPD"]},
{code:"I2-1-4",name:"Komunikācijas materiāli",level:2,ret:"Patstāvīgi",dept:["PPD"]},
{code:"I2-2",name:'INTERREG EUROPE "Green LUPO" dok.',level:1,group:true},
{code:"I2-2-1",name:"Korespondence",level:2,ret:"30.04.2034",dept:["TPZPD"]},
{code:"I2-2-2",name:"Līgumi, grozījumi, akti, rēķini",level:2,ret:"30.04.2034",dept:["TPZPD"]},
{code:"I2-2-3",name:"Rīkojumi, protokoli",level:2,ret:"30.04.2034",dept:["TPZPD"]},
{code:"I2-2-4",name:"Komunikācijas materiāli",level:2,ret:"30.04.2034",dept:["TPZPD"]},
{code:"...",name:"... vēl 31 projekts ar identiskām apakškat. ...",level:1,group:true},
{code:"I2-33",name:'ANM investīciju projekta dok.',level:1,group:true},
{code:"I2-33-1",name:"Korespondence",level:2,ret:"5 gadi",dept:["PPD"]},
{code:"I2-33-2",name:"Līgumi, grozījumi, akti",level:2,ret:"5 gadi",dept:["PPD"]},
{code:"I2-33-3",name:"Rīkojumi, protokoli",level:2,ret:"5 gadi",dept:["PPD"]},
{code:"I2-33-4",name:"Komunikācijas materiāli",level:2,ret:"5 gadi",dept:["PPD"]},
];
const DEPTS = [
{id:"AD",name:"Audita departaments"},{id:"AID",name:"Attīstības instrumentu departaments"},
{id:"BFD",name:"Budžeta un finanšu departaments"},{id:"DAD",name:"Dabas aizsardzības departaments"},
{id:"IPD",name:"Investīciju programmu departaments"},{id:"IUD",name:"Iepirkumu uzraudzības departaments"},
{id:"JD",name:"Juridiskais departaments"},{id:"KD",name:"Komunikācijas departaments"},
{id:"LN",name:"Lietvedības nodaļa"},{id:"ND",name:"Nozaru departaments"},
{id:"PN",name:"Personāla nodaļa"},{id:"PPD",name:"Projektu pārvaldības departaments"},
{id:"RAIN",name:"Reģionālās attīstības instrumentu nodaļa"},{id:"RAPN",name:"Reģionālās attīstības politikas nodaļa"},
{id:"SAN",name:"Saimnieciskā apkalpošanas nodaļa"},{id:"TAIN",name:"Telpiskās attīstības instrumentu nodaļa"},
{id:"TPZPD",name:"Telpiskās plānošanas un zemes pārvaldības dep."},{id:"VARAM",name:"Ministrijas vadība"},
{id:"VIAPD",name:"Valsts IKT arhitektūras pārvaldības dep."},{id:"VIKTAD",name:"Valsts IKT attīstības departaments"},
];
const PROGRAMMES = [
{id:"PRG-001",name:"ES fondu 2014.-2020. plānošanas periods",v1:"I1-1"},
{id:"PRG-002",name:"ES fondu 2021.-2027. plānošanas periods",v1:"I1-2"},
{id:"PRG-003",name:"ES Atveseļošanas un noturības mehānisma plāns",v1:"I1-3"},
{id:"PRG-004",name:"Sociālā klimata fonds",v1:"I1-4"},
{id:"PRG-005",name:"ES fondu 2028.-2034. plānošanas periods",v1:"I1-5"},
{id:"PRG-006",name:"LIFE nacionālais līdzfinansējums (EK konkurss)",v1:"I1-6"},
{id:"PRG-007",name:"LIFE nacionālais līdzfinansējums (uzsaukumi līdz 2024.)",v1:"I1-7"},
{id:"PRG-008",name:"LIFE Nacionālais kontaktpunkts",v1:"I1-8"},
{id:"PRG-009",name:"Latvijas vides aizsardzības fonds",v1:"I1-10"},
{id:"PRG-010",name:"LV-RU pārrobežu sadarbības programma 2014.-2020.",v1:"I1-12"},
{id:"PRG-011",name:"Interreg finanšu kontroles institūcija",v1:"I1-14"},
{id:"PRG-012",name:"Interreg vadošā iestāde",v1:"I1-15"},
{id:"PRG-013",name:"Interreg nacionālā atbildīgā iestāde",v1:"I1-16"},
];
const AUDIENCES = [
{id:"republic-orgs",name:"Republikas iestādes un organizācijas"},
{id:"state-admin-public",name:"Valsts pārvaldes iestādes, fiziskas un juridiskas personas"},
{id:"foreign-institutions",name:"Ārvalstu institūcijas"},
{id:"internal-units",name:"Struktūrvienības (iekšējā)"},
{id:"state-admin-official",name:"Valsts pārvaldes iestādes (dienesta vajadzībām)"},
{id:"infosec-dataprotection",name:"Informācijas drošība un personas datu aizsardzība"},
{id:"citizen-submissions",name:"Fizisko personu iesniegumi"},
{id:"capital-companies",name:"Kapitālsabiedrības"},
{id:"state-secret",name:"Valsts noslēpums"},
];
// ══════════════════════════════════════════════════════════
// RENDER
// ══════════════════════════════════════════════════════════
function renderTree(data, containerId, searchTerm) {
const c = document.getElementById(containerId);
c.innerHTML = '';
const term = (searchTerm||'').toLowerCase();
let shown = 0, cats = 0, grps = 0, rules = 0;
data.forEach(item => {
if (term && !item.group) {
if (!(item.code+' '+item.name).toLowerCase().includes(term)) return;
}
if (term && item.group) {
const hasChild = data.some(d => !d.group && d.code.startsWith(item.code) && (d.code+' '+d.name).toLowerCase().includes(term));
if (!hasChild && !(item.code+' '+item.name).toLowerCase().includes(term)) return;
}
const div = document.createElement('div');
div.className = `node d${item.level}` + (item.group ? ' grp' : '');
let tagHtml = '';
if (item.tags) {
item.tags.forEach(t => {
const cls = t==='project'?'tag-prj':t==='programme'?'tag-prg':'tag-aud';
const lbl = t==='project'?'projekts':t==='programme'?'programma':'auditorija';
tagHtml += ` <span class="tag-ind ${cls}">+${lbl}</span>`;
});
}
div.innerHTML = `<span class="code">${item.code}</span><span class="nm">${item.name}${tagHtml}</span>${item.ret?`<span class="ret">${item.ret}</span>`:''}`;
if (!item.group) {
shown++;
cats++;
if (item.rules) rules += item.rules.length;
div.onclick = () => selectNode(item, containerId.replace('-tree',''));
} else {
grps++;
}
c.appendChild(div);
});
const prefix = containerId.replace('-tree','');
const cntEl = document.getElementById(prefix+'-counter');
if (cntEl) cntEl.textContent = `Rāda: ${shown} kategorijas` + (term ? ` (filtrs: "${term}")` : '');
return {cats, grps, rules};
}
function selectNode(item, prefix) {
document.querySelectorAll(`#${prefix}-tree .node`).forEach(n => n.classList.remove('sel'));
event.currentTarget.classList.add('sel');
const d = document.getElementById(prefix+'-detail');
d.className = 'detail show';
let html = `<h3>${item.code}${item.name}</h3>`;
html += `<div class="row"><span class="lbl">Kods:</span> <span class="val">${item.code}</span></div>`;
html += `<div class="row"><span class="lbl">Glabāšana:</span> <span class="val">${item.ret||'—'}</span></div>`;
html += `<div class="row"><span class="lbl">Departaments:</span> <span class="val">${(item.dept||[]).join(', ')||'—'}</span></div>`;
if (item.tags && item.tags.length) {
html += `<div class="row"><span class="lbl">Obligātie tagi:</span> <span class="val">${item.tags.join(', ')}</span></div>`;
}
if (item.rules && item.rules.length) {
html += `<div class="row"><span class="lbl">Nosacījumu noteikumi:</span></div>`;
item.rules.forEach(r => {
html += `<div class="rule"><b>${r.label}</b>: ${r.condition} → glabāšana: <b>${r.ret}</b></div>`;
});
}
d.innerHTML = html;
}
function filterTree(prefix, term) {
const data = prefix === 'v2' ? V2_DATA : V1_DATA;
renderTree(data, prefix+'-tree', term);
}
function showTab(tab) {
['v1','v2','vocab','export'].forEach(t => {
document.getElementById('tab-'+t).classList.toggle('hidden', t!==tab);
});
document.querySelectorAll('.tab').forEach((el,i) => {
const tabs = ['v2','v1','vocab','export'];
el.classList.toggle('active', tabs[i]===tab);
});
}
function fillTable(id, data, cols) {
const tbody = document.querySelector(`#${id} tbody`);
tbody.innerHTML = '';
data.forEach(item => {
const tr = document.createElement('tr');
cols.forEach(c => {
const td = document.createElement('td');
td.textContent = item[c] || '';
tr.appendChild(td);
});
tbody.appendChild(tr);
});
}
function downloadXML(type) {
// In production, this would serialize the actual edited data
// For MVP, we provide placeholder download
const content = type === 'v2' ? '<!-- V2 XML - see classification-v2-proposed.xml -->' :
type === 'v1' ? '<!-- V1 XML - see classification-v1-asis.xml -->' :
'<!-- Vocabularies - see vocabularies.xml -->';
const filename = type === 'v2' ? 'classification-v2-proposed.xml' :
type === 'v1' ? 'classification-v1-asis.xml' : 'vocabularies.xml';
const blob = new Blob([content], {type:'application/xml'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url; a.download = filename; a.click();
URL.revokeObjectURL(url);
}
// Init
const v2s = renderTree(V2_DATA, 'v2-tree');
document.getElementById('v2-cat-count').textContent = v2s.cats;
document.getElementById('v2-grp-count').textContent = v2s.grps;
document.getElementById('v2-rule-count').textContent = v2s.rules;
const v1s = renderTree(V1_DATA, 'v1-tree');
document.getElementById('v1-cat-count').textContent = v1s.cats;
document.getElementById('v1-grp-count').textContent = v1s.grps;
fillTable('dept-table', DEPTS, ['id','name','nmr']);
fillTable('prog-table', PROGRAMMES, ['id','name','v1']);
fillTable('proj-table', [{id:"PRJ-001",name:"INTERREG BSR 2021.-2027.",v1:"I2-1"},{id:"PRJ-002",name:"INTERREG EUROPE Green LUPO",v1:"I2-2"},{id:"PRJ-003",name:"Jūras telpiskā plānošana (EASME/EMFF)",v1:"I2-3"},{id:"PRJ-004",name:"SaskaņOST (INTERREG BSR)",v1:"I2-4"},{id:"PRJ-005",name:"ANM Atvērtie dati",v1:"I2-5"},{id:"...",name:"... vēl 28 projekti (pilns saraksts vocabularies.xml) ...",v1:"..."}], ['id','name','v1']);
fillTable('aud-table', AUDIENCES, ['id','name']);
</script>
</body>
</html>

395
vdvc-classification.xsd Normal file
View File

@@ -0,0 +1,395 @@
<?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>