Skip to content
Permalink
Browse files

Fixes #13 - case korrigert

  • Loading branch information...
kjorlaug committed Apr 28, 2014
1 parent 291d883 commit 085e5eb105f3933d8b1da4896e9c230e719b9868
Showing with 64 additions and 118 deletions.
  1. +64 −118 xsd/sdp-melding.xsd
@@ -1,14 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="1.0" targetNamespace="http://begrep.difi.no/sdp/schema_v10" xmlns="http://begrep.difi.no/sdp/schema_v10" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:difi="http://begrep.difi.no"
xmlns:enc="http://www.w3.org/2001/04/xmlenc#" elementFormDefault="qualified">

<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="w3/xenc-schema.xsd" />
<xsd:import namespace="http://begrep.difi.no" schemaLocation="oppslag/oppslagstjeneste-metadata-14-05.xsd" />


<xsd:element name="melding" type="Melding" />


<xsd:schema xmlns="http://begrep.difi.no/sdp/schema_v10" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:difi="http://begrep.difi.no" xmlns:enc="http://www.w3.org/2001/04/xmlenc#" targetNamespace="http://begrep.difi.no/sdp/schema_v10" elementFormDefault="qualified" version="1.0">
<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="w3/xenc-schema.xsd"/>
<xsd:import namespace="http://begrep.difi.no" schemaLocation="oppslag/oppslagstjeneste-metadata-14-05.xsd"/>
<xsd:element name="melding" type="Melding"/>
<xsd:complexType name="Melding">
<xsd:annotation>
<xsd:documentation>
@@ -24,37 +18,32 @@
</xsd:annotation>
</xsd:element>
<xsd:choice>
<xsd:element name="fysiskPostInfo" type="FysiskPostInfo" minOccurs="1" maxOccurs="1" />
<xsd:element name="digitalPostInfo" type="DigitalPostInfo" minOccurs="1" maxOccurs="1" />
<xsd:element name="fysiskPostInfo" type="FysiskPostInfo" minOccurs="1" maxOccurs="1"/>
<xsd:element name="digitalPostInfo" type="DigitalPostInfo" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:element name="dokumentpakke" type="Dokumentpakke" minOccurs="1" maxOccurs="1" />
<xsd:element name="dokumentpakke" type="Dokumentpakke" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="prioritet" type="Meldingsprioritet" default="standard" use="optional"/>
<xsd:attribute name="prioritet" type="Meldingsprioritet" use="optional" default="standard"/>
</xsd:complexType>



<xsd:complexType name="Avsender">
<xsd:sequence>
<xsd:element name="organisasjon" type="Organisasjon" minOccurs="1" maxOccurs="1" />
<xsd:element name="organisasjon" type="Organisasjon" minOccurs="1" maxOccurs="1"/>
<xsd:element name="avsenderidentifikator" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100" />
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="fakturakonto" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="Repetisjoner">
<xsd:sequence>
<xsd:element name="dagerEtter" minOccurs="1" maxOccurs="10">
@@ -67,36 +56,29 @@
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:nonNegativeInteger">
<xsd:maxInclusive value="25" />
<xsd:maxInclusive value="25"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="Virksomhet">
<xsd:sequence>
<xsd:element name="sikkerDigitalPostAdresse" type="difi:SikkerDigitalPostAdresse" />
<xsd:element name="sikkerDigitalPostAdresse" type="difi:SikkerDigitalPostAdresse"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="Dokumentpakke">
<xsd:sequence>
<xsd:element name="encryptedKey" type="enc:EncryptedKeyType" />
<xsd:element name="encryptedKey" type="enc:EncryptedKeyType"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="Organisasjon">
<xsd:simpleContent>
<xsd:extension base="Iso6523Identitet">
<xsd:attribute name="authority" type="Iso6523Authority" use="optional" default="iso6523-actorid-upis" />
<xsd:attribute name="authority" type="Iso6523Authority" use="optional" default="iso6523-actorid-upis"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>

<xsd:simpleType name="Iso6523Identitet">
<xsd:annotation>
<xsd:documentation>
@@ -109,22 +91,19 @@
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{4}:\w{1,35}" />
<xsd:pattern value="[0-9]{4}:\w{1,35}"/>
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="Iso6523Authority">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="iso6523-actorid-upis" />
<xsd:enumeration value="iso6523-actorid-upis"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:complexType name="DigitalpostInfo">
<xsd:complexType name="DigitalPostInfo">
<xsd:sequence>
<xsd:element name="virkningsdato" type="xsd:date" minOccurs="0" maxOccurs="1" />
<xsd:element name="aapningskvittering" type="xsd:boolean" minOccurs="0" maxOccurs="1" default="false" />
<xsd:element name="sikkerhetsnivaa" type="Sikkerhetsnivaa" minOccurs="0" maxOccurs="1" default="4" />
<xsd:element name="virkningsdato" type="xsd:date" minOccurs="0" maxOccurs="1"/>
<xsd:element name="aapningskvittering" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
<xsd:element name="sikkerhetsnivaa" type="Sikkerhetsnivaa" default="4" minOccurs="0" maxOccurs="1"/>
<xsd:element name="tittel" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
@@ -133,162 +112,133 @@
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100" />
<xsd:minLength value="1" />
<xsd:maxLength value="100"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="varsler" type="Varsler" minOccurs="0" maxOccurs="1" />
<xsd:element name="varsler" type="Varsler" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>

<xsd:simpleType name="Sikkerhetsnivaa">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="3" />
<xsd:enumeration value="4" />
<xsd:enumeration value="3"/>
<xsd:enumeration value="4"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:complexType name="Mottaker">
<xsd:choice>
<xsd:element name="person" type="difi:Person" />
<xsd:element name="virksomhet" type="Virksomhet" />
<xsd:element name="person" type="difi:Person"/>
<xsd:element name="virksomhet" type="Virksomhet"/>
</xsd:choice>
</xsd:complexType>


<xsd:complexType name="Varsler">
<xsd:sequence>
<xsd:element name="epostVarsel" type="EpostVarsel" minOccurs="0" maxOccurs="1" />
<xsd:element name="smsVarsel" type="SmsVarsel" minOccurs="0" maxOccurs="1" />
<xsd:element name="epostVarsel" type="EpostVarsel" minOccurs="0" maxOccurs="1"/>
<xsd:element name="smsVarsel" type="SmsVarsel" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="EpostVarsel">
<xsd:sequence>
<xsd:element name="tekst" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="500" />
<xsd:minLength value="1" />
<xsd:maxLength value="500"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="repetisjoner" type="Repetisjoner" minOccurs="1" maxOccurs="1">
<xsd:unique name="UnikeEpostVarselRepetisjoner">
<xsd:selector xpath="dagerEtter" />
<xsd:field xpath="." />
<xsd:selector xpath="dagerEtter"/>
<xsd:field xpath="."/>
</xsd:unique>
</xsd:element>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="SmsVarsel">
<xsd:sequence>
<xsd:element name="tekst" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="160" />
<xsd:minLength value="1" />
<xsd:maxLength value="160"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="repetisjoner" type="Repetisjoner" minOccurs="1" maxOccurs="1">
<xsd:unique name="UnikeSmsVarselRepetisjoner">
<xsd:selector xpath="dagerEtter" />
<xsd:field xpath="." />
<xsd:selector xpath="dagerEtter"/>
<xsd:field xpath="."/>
</xsd:unique>
</xsd:element>
</xsd:sequence>
</xsd:complexType>


<!-- typer nedenfor er for fysisk post -->


<xsd:complexType name="FysiskPostInfo">
<xsd:sequence>
<xsd:element name="mottaker" type="Navn" minOccurs="1" maxOccurs="1" />
<xsd:element name="mottaker" type="Navn" minOccurs="1" maxOccurs="1"/>
<xsd:choice>
<xsd:element name="norskMottakeradresse" type="NorskPostadresse" minOccurs="1" maxOccurs="1" />
<xsd:element name="utenlandskMottakeradresse" type="UtenlandskPostadresse" minOccurs="1" maxOccurs="1" />
<xsd:element name="norskMottakeradresse" type="NorskPostadresse" minOccurs="1" maxOccurs="1"/>
<xsd:element name="utenlandskMottakeradresse" type="UtenlandskPostadresse" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:element name="posttype" minOccurs="0" maxOccurs="1" default="A">
<xsd:element name="posttype" default="A" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A" />
<xsd:enumeration value="B" />
<xsd:enumeration value="A"/>
<xsd:enumeration value="B"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="returPostmottaker" type="Navn" minOccurs="1" maxOccurs="1" />
<xsd:element name="returadresse" type="NorskPostadresse" minOccurs="1" maxOccurs="1" />
<xsd:element name="returPostmottaker" type="Navn" minOccurs="1" maxOccurs="1"/>
<xsd:element name="returadresse" type="NorskPostadresse" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="NorskPostadresse">
<xsd:sequence>
<xsd:element name="adresselinje1" type="Adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje2" type="Adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="postnummer" type="NorskPostnummer" minOccurs="1" maxOccurs="1" />
<xsd:element name="poststed" type="Poststed" minOccurs="1" maxOccurs="1" />
<xsd:element name="adresselinje1" type="Adresselinje" minOccurs="0" maxOccurs="1"/>
<xsd:element name="adresselinje2" type="Adresselinje" minOccurs="0" maxOccurs="1"/>
<xsd:element name="postnummer" type="NorskPostnummer" minOccurs="1" maxOccurs="1"/>
<xsd:element name="poststed" type="Poststed" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="UtenlandskPostadresse">
<xsd:sequence>
<xsd:element name="adresselinje1" type="Adresselinje" minOccurs="1" maxOccurs="1" />
<xsd:element name="adresselinje2" type="Adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje3" type="Adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje4" type="Adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje1" type="Adresselinje" minOccurs="1" maxOccurs="1"/>
<xsd:element name="adresselinje2" type="Adresselinje" minOccurs="0" maxOccurs="1"/>
<xsd:element name="adresselinje3" type="Adresselinje" minOccurs="0" maxOccurs="1"/>
<xsd:element name="adresselinje4" type="Adresselinje" minOccurs="0" maxOccurs="1"/>
<xsd:choice>
<xsd:element name="land" type="Land" minOccurs="1" maxOccurs="1" />
<xsd:element name="landkode" type="Landkode" minOccurs="1" maxOccurs="1" />
<xsd:element name="land" type="Land" minOccurs="1" maxOccurs="1"/>
<xsd:element name="landkode" type="Landkode" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>


<xsd:simpleType name="Navn">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="130" />
<xsd:maxLength value="130"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="NorskPostnummer">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4}" />
<xsd:pattern value="\d{4}"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="Adresselinje">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100" />
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="Poststed">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="80" />
<xsd:maxLength value="80"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="Land">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="80" />
<xsd:maxLength value="80"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="Landkode">
<xsd:annotation>
<xsd:documentation>
@@ -297,17 +247,13 @@
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-zA-Z]{2}"></xsd:pattern>
<xsd:pattern value="[a-zA-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="Meldingsprioritet">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="standard" />
<xsd:enumeration value="prioritert" />
<xsd:enumeration value="standard"/>
<xsd:enumeration value="prioritert"/>
</xsd:restriction>
</xsd:simpleType>


</xsd:schema>

0 comments on commit 085e5eb

Please sign in to comment.
You can’t perform that action at this time.