Skip to content

Instantly share code, notes, and snippets.

@yonyonson
Created November 27, 2017 14:14
Show Gist options
  • Save yonyonson/723d94780d5c7a0e5438759a620bc94c to your computer and use it in GitHub Desktop.
Save yonyonson/723d94780d5c7a0e5438759a620bc94c to your computer and use it in GitHub Desktop.
Example of a combined XSD
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://schema.brreg.no/KoFuVi"
version="1.1"
xmlns="http://schema.brreg.no/KoFuVi"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include name="kontaktinfo" schemaLocation="./kontaktinfo.xsd" />
<xs:element name="Kontaktinformasjon" type="Aktør"/>
</xs:schema>
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schema.brreg.no/KoFuVi" version="1.1" xmlns="http://schema.brreg.no/KoFuVi" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>Generert 2017-10-31T15:55:11.463</xs:documentation>
</xs:annotation>
<xs:complexType name="Aksesspunkt">
<xs:annotation>
<xs:documentation>Definisjon: elektronisk postkontor </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="Nettadresse">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="aksesspunktoperatør" type="Enhet">
<xs:annotation>
<xs:documentation>Definisjon: opererer et knutepunkt for formidling av elektroniske dokumenter </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Aktør">
<xs:annotation>
<xs:documentation>Definisjon: person eller enhet vi samhandler med </xs:documentation>
</xs:annotation>
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element maxOccurs="1" minOccurs="0" name="kontaktinformasjon" type="DigitalAdresse">
<xs:annotation>
<xs:documentation>Definisjon: informasjon som en avsender trenger for å kommunisere med en mottaker </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="varslingsadresse" type="Varslingsadresse">
<xs:annotation>
<xs:documentation>Definisjon: digital adresse som brukes for å varsle enhet eller person </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DigitalAdresse">
<xs:annotation>
<xs:documentation>Definisjon: noe avsender bruker for å nå mottaker i et elektronisk datanettverk </xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="identifikator" type="xs:string">
<xs:annotation>
<xs:documentation>Definisjon: kombinasjon av tegn og/eller bokstaver som identifiserer en aktør eller et objekt innenfor et sett av aktører eller objekter </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="navn" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="bekreftetDato" type="Dato"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="kanMottaMeldingstype" type="Meldingstype"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="E-postadresse">
<xs:complexContent>
<xs:extension base="Varslingsadresse">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="domenenavn" type="xs:string">
<xs:annotation>
<xs:documentation>Definisjon: digital adresse som benyttes til adressering på internett </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="1" name="brukernavn" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Enhet">
<xs:complexContent>
<xs:extension base="Aktør">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="enhetsidentifikator" type="Enhetsidentifikator"/>
<xs:element maxOccurs="1" minOccurs="0" name="navn" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Meldingsboks">
<xs:annotation>
<xs:documentation>Definisjon: digital postkasse for formidling, lagring og behandling av digitale meldinger til en spesifikk mottaker </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DigitalAdresse">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="meldingsbokstype" type="Meldingsbokstype"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Meldingstype">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="tjenesteområde" type="Tjenesteområde"/>
<xs:element maxOccurs="1" minOccurs="0" name="dokumenttype" type="Dokumenttype">
<xs:annotation>
<xs:documentation>&lt;html&gt;&#10; &lt;head&gt;&#10;&#9;&#9;&lt;style&gt;&#10;&#9;&#9;&#9;p {padding:0px; margin:0px;}&#10;&#9;&#9;&lt;/style&gt;&#10;&#9;&lt;/head&gt;&#10; &lt;body&gt;&#10; &lt;p&gt;&#10;F.eks. EHF-dokumenter, se https://www.anskaffelser.no/digitalisering/verktoykasse-systemleverandorer/formater-ehf-bis&#10;&#10; &lt;/p&gt;&#10;&#10;&lt;/body&gt;&#10;&lt;/html&gt;</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Mobiltelefonnummer">
<xs:complexContent>
<xs:extension base="Varslingsadresse">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="internasjonaltPrefiks" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="nasjonaltNummer" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Nettadresse">
<xs:complexContent>
<xs:extension base="DigitalAdresse">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="protokoll" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="domenenavn" type="xs:string">
<xs:annotation>
<xs:documentation>Definisjon: digital adresse som benyttes til adressering på internett </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="filsti" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Person">
<xs:annotation>
<xs:documentation>Definisjon: menneske slik det opptrer i en sosial sammenheng </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="Aktør">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="personidentifikator" type="Personidentifikator"/>
<xs:element maxOccurs="1" minOccurs="0" name="personnavn" type="Personnavn"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Varslingsadresse">
<xs:complexContent>
<xs:extension base="DigitalAdresse">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="PersonidentifikatorType">
<xs:restriction base="xs:string">
<xs:enumeration value="D-nummer"/>
<xs:enumeration value="fødselsnummer">
<xs:annotation>
<xs:documentation>Definisjon: elleve-sifret identitetsnummer for person </xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="utenlandskPersonidentifikator"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Dato">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:complexType name="Personidentifikator">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="verdi" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="type" type="PersonidentifikatorType"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Tjenesteområde">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="Meldingsbokstype">
<xs:annotation>
<xs:documentation>Eksempel: Meldingsboks i Altinn, Digipost, Norge.no, e-boks, Sismo meldingsboks.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="Dokumenttype">
<xs:annotation>
<xs:documentation>F.eks. EHF-dokumenter.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="EnhetsidentifikatorType">
<xs:restriction base="xs:string">
<xs:enumeration value="organisasjonsnummer">
<xs:annotation>
<xs:documentation>Definisjon: nisifret nummer som entydig identifiserer enheter i Enhetsregisteret </xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="utenlandskEnhetsidentifikator"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Enhetsidentifikator">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="verdi" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="type" type="EnhetsidentifikatorType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Personnavn">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="fornavn" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="mellomnavn" type="xs:string">
<xs:annotation>
<xs:documentation>Type identifikator (fødselsnummer, organisasjonsnummer, URI, guid)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="1" name="etternavn" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment