Skip to content
Permalink
Browse files

#155 har synkronisert XSD og begrepene. XSD'n er oppdatert til å bruk…

…e de begrep som er definert.

Mottaker i sdp-felles.xsd er nå ikke lenger obligatorisk!
  • Loading branch information...
Arne Berner
Arne Berner committed Nov 28, 2014
1 parent 3824859 commit daca2b28ca94a8415fbf4de04388530bc3017e68
Showing with 21 additions and 107 deletions.
  1. +1 −92 begrep/FysiskPostInfo.textile
  2. +3 −3 begrep/FysiskPostadresse.textile
  3. +1 −1 begrep/Person.textile
  4. +1 −1 xsd/sdp-felles.xsd
  5. +15 −10 xsd/sdp-melding.xsd
@@ -24,100 +24,9 @@ table(table table-striped).
|_. Identifikator |_. Kardinalitet |_. Datatype |
| "postMottakerAdresse":FysiskPostadresse | 1..1 | "sdp:FysiskPostadresse":FysiskPostadresse |
| "returPostAdresse":FysiskPostadresse | 1..1 | "sdp:FysiskPostadresse":FysiskPostadresse |
| "returPostStrategi":/Felles/returPostStrategi | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |
| "returPostHaandtering":/Felles/returPostHaandtering | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |
| "posttype":/Felles/posttype | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |
| "utskriftstype":/Felles/utskriftstype | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |


h3. XSD

<pre class="brush: xml; toolbar: false">
<xsd:complexType name="FysiskPostInfo">
<xsd:sequence>
<xsd:choice>
<xsd:element name="norsk-mottakeradresse" type="sdp:norsk-postadresse" minOccurs="1" maxOccurs="1" />
<xsd:element name="utenlandsk-mottakeradresse" type="sdp:utenlandsk-postadresse" minOccurs="1" maxOccurs="1" />
</xsd:choice>
<xsd:element name="posttype" minOccurs="0" maxOccurs="1" default="A">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="A|B" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="retur-postmottaker" type="sdp:postmottaker-navn" minOccurs="1" maxOccurs="1"/>
<xsd:element name="returadresse" type="sdp:norsk-postadresse" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="norsk-postadresse">
<xsd:sequence>
<xsd:element name="adresselinje1" type="sdp:adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje2" type="sdp:adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="postnummer" type="sdp:norsk-postnummer" minOccurs="1" maxOccurs="1" />
<xsd:element name="poststed" type="sdp:poststed" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="utenlandsk-postadresse">
<xsd:sequence>
<xsd:element name="adresselinje1" type="sdp:adresselinje" minOccurs="1" maxOccurs="1" />
<xsd:element name="adresselinje2" type="sdp:adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje3" type="sdp:adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:element name="adresselinje4" type="sdp:adresselinje" minOccurs="0" maxOccurs="1" />
<xsd:choice>
<xsd:element name="land" type="sdp:land" minOccurs="1" maxOccurs="1"/>
<xsd:element name="land-kode" type="sdp:land-kode" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>


<xsd:simpleType name="postmottaker-navn">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="130" />
</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="norsk-postnummer">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>


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


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


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


<xsd:simpleType name="land-kode">
<xsd:annotation>
<xsd:documentation>
To-bokstavs landkode ihht ISO 3166-1 alpha-2 standarden.
(http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2" />
</xsd:restriction>
</xsd:simpleType>
</pre>

@@ -18,9 +18,9 @@ prev: Begreper

h4. Attributer

FysiskPostadresse er enten en norsk eller en utenlandsadresse.
FysiskPostadresse er enten en NorskPostadresse eller en UtenlandskPostadresse.

For Norske adresser er FysiskPostadresse definert slik:
h4. NorskPostadresse:

table(table table-striped).
|_. Term |_. Kardinalitet |_. Datatype |_. Regler |
@@ -31,7 +31,7 @@ table(table table-striped).
| "postnummer":http://www.w3.org/TR/xmlschema-2/#string | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string | 4 siffer |
| "poststed":http://www.w3.org/TR/xmlschema-2/#string | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string | Maks 80 tegn |

For utenlandske adresser er FysiskPostadresse definert slik:
h4. UtenlandskPostadresse:

table(table table-striped).
|_. Term |_. Kardinalitet |_. Datatype |_. Regler |
@@ -23,7 +23,7 @@ h4. Attributer
table(table table-striped).
|_. Term |_. Kardinalitet |_. Datatype |
| "personidentifikator":/Felles/personidentifikator | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |
| "postkasseadresse":/Felles/postkasseadresse | 0..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |
| "postkasseadresse":/Felles/postkasseadresse | 1..1 | "xs:string":http://www.w3.org/TR/xmlschema-2/#string |



@@ -43,7 +43,7 @@

<xsd:complexType name="Mottaker">
<xsd:sequence>
<xsd:element name="person" type="Person" minOccurs="1" maxOccurs="1"/>
<xsd:element name="person" type="Person" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>

@@ -190,11 +190,7 @@

<xsd:complexType name="FysiskPostInfo">
<xsd:sequence>
<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:choice>
<xsd:element name="fysiskPostadresse" type="FysiskPostadresse" minOccurs="1" maxOccurs="1"/>
<xsd:element name="posttype" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
@@ -203,18 +199,27 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="returHaandtering" minOccurs="1" maxOccurs="1">
<xsd:element name="returPostHaandtering" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="RETURNER"/>
<xsd:enumeration value="MAKULER"/>
<xsd:enumeration value="DIREKTE_RETUR"/>
<xsd:enumeration value="MAKULERING_MED_MELDING"/>
</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="returPostAdresse" type="NorskPostadresse" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="FysiskPostadresse">
<xsd:sequence>
<xsd:element name="navn" 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:choice>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="NorskPostadresse">
<xsd:sequence>

0 comments on commit daca2b2

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