You've already forked Organizations_register
Import UAPF package
Upload files to "/"
This commit is contained in:
86
vdvc-register.xsd
Normal file
86
vdvc-register.xsd
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://vdvc.gov.lv/schema/vdvc-register"
|
||||
xmlns="http://vdvc.gov.lv/schema/vdvc-register"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
VDVC Register schema for two-level organizational numbering: level 1 = Ministry (resors), level 2 = Organization (iestāde).
|
||||
Fields enforced: ministry/@code (two digits), organization/@code (four digits), organization/@nmr (11 digits),
|
||||
auto-generated @docPrefix = "{ministryCode}-{organizationCode}".
|
||||
Language of element names: English. Generated on 2026-02-03.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
|
||||
<!-- Root element -->
|
||||
<xs:element name="vdvcRegister">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ministry" type="ministryType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:string" use="required"/>
|
||||
<xs:attribute name="created" type="xs:date" use="required"/>
|
||||
<xs:attribute ref="xml:lang" use="optional"/>
|
||||
</xs:complexType>
|
||||
<!-- Uniqueness constraints across document -->
|
||||
<xs:unique name="uniqueMinistryCode">
|
||||
<xs:selector xpath="ministry"/>
|
||||
<xs:field xpath="@code"/>
|
||||
</xs:unique>
|
||||
<xs:unique name="uniqueNmrAcrossRegister">
|
||||
<xs:selector xpath="ministry/organization"/>
|
||||
<xs:field xpath="@nmr"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
<!-- Ministry type -->
|
||||
<xs:complexType name="ministryType">
|
||||
<xs:sequence>
|
||||
<xs:element name="organization" type="organizationType" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="code" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="name" type="xs:string" use="optional"/>
|
||||
<!-- Uniqueness of organization codes within the ministry -->
|
||||
<xs:unique name="uniqueOrgCodeWithinMinistry">
|
||||
<xs:selector xpath="organization"/>
|
||||
<xs:field xpath="@code"/>
|
||||
</xs:unique>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Organization type -->
|
||||
<xs:complexType name="organizationType">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="code" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d4"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="nmr" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d11"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="docPrefix" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d2-\d4"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
Reference in New Issue
Block a user