(* $Workfile:   RDI.TPL  $ $Revision:   2.10  $ *)
(* Generally  common fields                                                  *)

ORName                     LABEL     = Dornm
                           STRUCTURE = SEQUENCE
                           TAG       = (A 0 C)
                           CHILDREN  = { <Dsatt, U 16 C,M,0>E,
                                         <Dddal, U 16 C,O,0> ,
                                         <Dxatl, U 17 C,O,0> ,
                                         <Ddirn, C  0 C,O,0> }

ORName without tag         LABEL     = Dorna
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dsatt, U 16 C,M,0>E,
                                         <Dddal, U 16 C,O,0> ,
                                         <Dxatl, U 17 C,O,0> ,
                                         <Ddirn, C  0 C,O,0> }

ORAddress                  LABEL     = Dorad
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dsatt, U 16 C,M,0>E,
                                         <Dddal, U 16 C,O,0> ,
                                         <Dxatl, U 17 C,O,0> }

CountryName                LABEL     = Dctry
                           STRUCTURE = CHOICE
                           TAG       = (A 1 C)
                           CHILDREN  = { <Dc121, U 18 P,O,3>,
                                         <Dcacd, U 19 P,O,2>}

CountryNameISO3166Alpha2   LABEL     = Dcacd
                           STRUCTURE = PRINTABLE STRING

CountryNameX121DccCode     LABEL     = Dc121
                           STRUCTURE = NUMERIC STRING

AdministrationName         LABEL     = Dadmd
                           STRUCTURE = CHOICE
                           TAG       = (A 2 C)
                           CHILDREN  = { <Dadmn, U 18 P,O,16>,
                                         <Dadmp, U 19 P,O,16>}

AdminNamePrintable         LABEL     = Dadmp
                           STRUCTURE = PRINTABLE STRING

AdminNameNumeric           LABEL     = Dadmn
                           STRUCTURE = NUMERIC STRING

StandardAttributeList      LABEL     = Dsatt
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dctry, A  1 C,O,0>E,
                                         <Dadmd, A  2 C,O,0>E,
                                         <Dx121, C  0 S,O,15>,
                                         <Dtmid, C  1 S,O,24>,
                                         <Dprmd, C  2 C,O,0>E,
                                         <Dorgn, C  3 S,O,64>,
                                         <Duaid, C  4 S,O,32>,
                                         <Dpers, C  5 C,O,0> ,
                                         <Dsorg, C  6 C,O,0>  }

ExtensionAttributeList     LABEL     = Dxatl
                           STRUCTURE = SET OF
                           LIMIT     = 256
                           CHILDREN  = { <Dxatt, U 16 C,O,0> }

ExtensionAttribute         LABEL     = Dxatt
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dxtyp, C  0 P,M,0>*,
                                         <Dxval, C  1 C,M,0>E}

ExtensionType              LABEL     = Dxtyp
                           STRUCTURE = INTEGER

ExtensionValue             LABEL     = Dxval
                           STRUCTURE = ANY DEFINED BY
                           TAG       = (C  1 C)
                           DEFGLABEL = Dxtyp
                           REGISTER  = { <01,Dcomm, U 19 S,64>,
                                         <02,Dtcom, U 20 S,64>,
                                         <03,Dtorg, U 20 S,64>,
                                         <04,Dtper, U 17 C,0>,
                                         <05,Dtsou, U 16 C,0>,
                                         <06,Dtddl, U 16 C,0>D,
                                         <07,Dpnam, U 19 S,16>,
                                         <08,Dpctr, U  0 P,0>,
                                         <09,Dpcod, U  0 P,0>,
                                         <0A,Dponm, U 17 C,0>,
                                         <0B,Dpnoo, U 17 C,0>,
                                         <0C,Deadd, U 17 C,0>,
                                         <0D,Dpper, U 17 C,0>,
                                         <0E,Dporg, U 17 C,0>,
                                         <0F,Dpead, U 17 C,0>,
                                         <10,Dpuna, U 17 C,0>,
                                         <11,Dsadd, U 17 C,0>,
                                         <12,Dpbad, U 17 C,0>,
                                         <13,Dprad, U 17 C,0>,
                                         <14,Dpuni, U 17 C,0>,
                                         <15,Dploc, U 17 C,0>,
                                         <16,Dexna, U  0 P,0>,
                                         <17,Dttyp, U  2 P,0> }

CommonName                 LABEL     = Dcomm
                           STRUCTURE = PRINTABLE STRING

TeletexCommonName          LABEL     = Dtcom
                           STRUCTURE = TELETEX STRING

TeletexOrganisationName    LABEL     = Dtorg
                           STRUCTURE = TELETEX STRING

TeletexPersonalName        LABEL     = Dtper
                           STRUCTURE = SET
                           CHILDREN  = { <Dtsur, C  0 S,M,40> ,
                                         <Dtgiv, C  1 S,O,16> ,
                                         <Dtini, C  2 S,O,5>  ,
                                         <Dtgen, C  3 S,O,3>  }

TeletexSurName             LABEL     = Dtsur
                           STRUCTURE = TELETEX STRING

TeletexGivenName           LABEL     = Dtgiv
                           STRUCTURE = TELETEX STRING

TeletexInitials            LABEL     = Dtini
                           STRUCTURE = TELETEX STRING

TeletexGenerationQualifier LABEL     = Dtgen
                           STRUCTURE = TELETEX STRING

TeletexOrgUnitNames        LABEL     = Dtsou
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 4
                           CHILDREN  = { <Dtoun, U 20 S,O,32>D }

TeletexOrgUnitName         LABEL     = Dtoun
                           STRUCTURE = TELETEX STRING

TeletexDomainDefdAttribs   LABEL     = Dtddl
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 4
                           CHILDREN  = { <Dtdda, U 16 C,O,0>D }

TeletexDomainDefdAttrib    LABEL     = Dtdda
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dtddt, U 20 S,M,8>D ,
                                         <Dtddv, U 20 S,M,128>D }

TeletexDomainDefdAttrbType LABEL     = Dtddt
                           STRUCTURE = TELETEX STRING

TeletexDomainDefdAttrbValu LABEL     = Dtddv
                           STRUCTURE = TELETEX STRING

PDSName                    LABEL     = Dpnam
                           STRUCTURE = PRINTABLE STRING

PhysicalDelivryCountryName LABEL     = Dpctr
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Dc12p, U 18 P,O,3> ,
                                         <Dcacp, U 19 P,O,2> }

PhysDelCtryNmISO3166Alpha2 LABEL     = Dcacp
                           STRUCTURE = PRINTABLE STRING

PhysDelCtryNameX121DccCode LABEL     = Dc12p
                           STRUCTURE = NUMERIC STRING

PostalCode                 LABEL     = Dpcod
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Dpcdn, U 18 P,O,16> ,
                                         <Dpcdp, U 19 P,O,16> }

PostalCodeNumeric          LABEL     = Dpcdn
                           STRUCTURE = NUMERIC STRING


PostalCodePrintable        LABEL     = Dpcdp
                           STRUCTURE = PRINTABLE STRING

PhysicalDeliveryOfficeName LABEL     = Dponm
                           STRUCTURE = SET
                           CHILDREN  = { <Dponp, U 19 S,O,30>,
                                         <Dpont, U 20 S,O,30> }

PhysicalDeliveryOffNamePrb LABEL     = Dponp
                           STRUCTURE = PRINTABLE STRING

PhysicalDeliveryOffNameTtx LABEL     = Dpont
                           STRUCTURE = TELETEX STRING

PhysicalDelvryOfficeNumber LABEL     = Dpnoo
                           STRUCTURE = SET
                           CHILDREN  = { <Dpnop, U 19 S,O,30>,
                                         <Dpnot, U 20 S,O,30> }

PhysicalDeliveryOffNumbPrb LABEL     = Dpnop
                           STRUCTURE = PRINTABLE STRING

PhysicalDeliveryOffNumbTtx LABEL     = Dpnot
                           STRUCTURE = TELETEX STRING

ExtensnORAddressComponents LABEL     = Deadd
                           STRUCTURE = SET
                           CHILDREN  = { <Deadp, U 19 S,O,30>,
                                         <Deadt, U 20 S,O,30> }

ExtensnORAddressCompsPrble LABEL     = Deadp
                           STRUCTURE = PRINTABLE STRING

ExtensnORAddressCompsTtx   LABEL     = Deadt
                           STRUCTURE = TELETEX STRING

PhysicalDelvryPersonalName LABEL     = Dpper
                           STRUCTURE = SET
                           CHILDREN  = { <Dppep, U 19 S,O,30>,
                                         <Dppet, U 20 S,O,30> }

PhysicalDelvryPersNamePrbl LABEL     = Dppep
                           STRUCTURE = PRINTABLE STRING

PhysicalDelvryPersNameTtx  LABEL     = Dppet
                           STRUCTURE = TELETEX STRING

PhysicalDelvryOrganiznName LABEL     = Dporg
                           STRUCTURE = SET
                           CHILDREN  = { <Dporp, U 19 S,O,30>,
                                         <Dport, U 20 S,O,30> }

PhysicalDelvryOrgNamePrble LABEL     = Dporp
                           STRUCTURE = PRINTABLE STRING

PhysicalDelvryOrgNameTtx   LABEL     = Dport
                           STRUCTURE = TELETEX STRING

ExtnPhysDelAddressCompnnts LABEL     = Dpead
                           STRUCTURE = SET
                           CHILDREN  = { <Dpeap, U 19 S,O,30>,
                                         <Dpeat, U 20 S,O,30> }

ExtnPhysDelAddressCompsPrb LABEL     = Dpeap
                           STRUCTURE = PRINTABLE STRING

ExtnPhysDelAddressCompsTtx LABEL     = Dpeat
                           STRUCTURE = TELETEX STRING

UnformattedPostalAddress   LABEL     = Dpuna
                           STRUCTURE = SET
                           CHILDREN  = { <Dpunf, U 16 C,O,0>,
                                         <Dtunf, U 20 S,O,180> }

UnfmattedPostAddrPrintable LABEL     = Dpunf
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 6
                           CHILDREN  = { <Dplin, U 19 S,O,30> }

UnfmattedPostAddrPrtblLine LABEL     = Dplin
                           STRUCTURE = PRINTABLE STRING

UnfmattedPostalAddrTeletex LABEL     = Dtunf
                           STRUCTURE = TELETEX STRING

StreetAddress              LABEL     = Dsadd
                           STRUCTURE = SET
                           CHILDREN  = { <Dsadp, U 19 S,O,30>,
                                         <Dsadt, U 20 S,O,30> }

StreetAddressPrintable     LABEL     = Dsadp
                           STRUCTURE = PRINTABLE STRING

StreetAddressTeletex       LABEL     = Dsadt
                           STRUCTURE = TELETEX STRING

PostOfficeBoxAddress       LABEL     = Dpbad
                           STRUCTURE = SET
                           CHILDREN  = { <Dpbap, U 19 S,O,30>,
                                         <Dpbat, U 20 S,O,30> }

PostOfficeBoxAddressPrble  LABEL     = Dpbap
                           STRUCTURE = PRINTABLE STRING

PostOfficeBoxAddressTtx    LABEL     = Dpbat
                           STRUCTURE = TELETEX STRING

PosteRestanteAddress       LABEL     = Dprad
                           STRUCTURE = SET
                           CHILDREN  = { <Dprap, U 19 S,O,30>,
                                         <Dprat, U 20 S,O,30> }

PosteRestanteAddressPrble  LABEL     = Dprap
                           STRUCTURE = PRINTABLE STRING

PosteRestanteAddressTtx    LABEL     = Dprat
                           STRUCTURE = TELETEX STRING

UniquePostalName           LABEL     = Dpuni
                           STRUCTURE = SET
                           CHILDREN  = { <Dpunp, U 19 S,O,30>,
                                         <Dpunt, U 20 S,O,30> }

UniquePostalNamePrintable  LABEL     = Dpunp
                           STRUCTURE = PRINTABLE STRING

UniquePostalNameTeletex    LABEL     = Dpunt
                           STRUCTURE = TELETEX STRING

LocalPostalAttributes      LABEL     = Dploc
                           STRUCTURE = SET
                           CHILDREN  = { <Dplop, U 19 S,O,30>,
                                         <Dplot, U 20 S,O,30> }

LocalPostalAttributesPrble LABEL     = Dplop
                           STRUCTURE = PRINTABLE STRING

LocalPostalAttributesTtx   LABEL     = Dplot
                           STRUCTURE = TELETEX STRING

ExtendedNetworkAddress     LABEL     = Dexna
                           STRUCTURE = CHOICE
                           CHILDREN  = { <D1634, U 16 C,O,0>,
                                         <Dnadc, P 16 C,O,0> }

E1634Address               LABEL     = D1634
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <D163n, C  0 S,M,15>,
                                         <D163a, C  1 S,O,40> }

E1634AddressNumber         LABEL     = D163n
                           STRUCTURE = NUMERIC STRING

E1634AddressSubAddress     LABEL     = D163a
                           STRUCTURE = NUMERIC STRING

TerminalType               LABEL     = Dttyp
                           STRUCTURE = INTEGER

DomainDefinedAttributeList LABEL     = Dddal
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 4
                           CHILDREN  = { <Dddat, U 16 C,O,0>D }


(*****************************************************************************)
(* Constraint on Dddty is 18 for some obscure NIST downgrading of common     *)
(* name reason                                                               *)
(*****************************************************************************)
DomainDefinedAttribute     LABEL     = Dddat
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dddty, U 19 S,M,18> ,
                                         <Dddvl, U 19 S,M,128> }

DomainDefinedAttrType      LABEL     = Dddty
                           STRUCTURE = PRINTABLE STRING

DomainDefinedAttrValue     LABEL     = Dddvl
                           STRUCTURE = PRINTABLE STRING

X.121Address               LABEL     = Dx121
                           STRUCTURE = NUMERIC STRING

TerminalID                 LABEL     = Dtmid
                           STRUCTURE = PRINTABLE STRING

OrganisationName           LABEL     = Dorgn
                           STRUCTURE = PRINTABLE STRING

UniqueUAIdentifier         LABEL     = Duaid
                           STRUCTURE = NUMERIC STRING

PersonalName               LABEL     = Dpers
                           STRUCTURE = SET
                           CHILDREN  = { <Dsurn, C  0 S,M,40> ,
                                         <Dgivn, C  1 S,O,16> ,
                                         <Dinit, C  2 S,O,5>  ,
                                         <Dgenq, C  3 S,O,3>  }

SurName                    LABEL     = Dsurn
                           STRUCTURE = PRINTABLE STRING

GivenName                  LABEL     = Dgivn
                           STRUCTURE = PRINTABLE STRING

Initials                   LABEL     = Dinit
                           STRUCTURE = PRINTABLE STRING

GenerationQualifier        LABEL     = Dgenq
                           STRUCTURE = PRINTABLE STRING

SEQ OF OrganisationalUnit  LABEL     = Dsorg
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 4
                           CHILDREN  = { <Dorgu, U 19 S,O,32> }

OrganisationalUnit         LABEL     = Dorgu
                           STRUCTURE = PRINTABLE STRING

PrivateDomainName          LABEL     = Dprmd
                           STRUCTURE = CHOICE
                           TAG       = (C 2 C)
                           CHILDREN  = { <Dprmn, U 18 S,O,16> ,
                                         <Dprmp, U 19 S,O,16> }

PrivateDomNamePrintable    LABEL     = Dprmp
                           STRUCTURE = PRINTABLE STRING

PrivateDomNameNumeric      LABEL     = Dprmn
                           STRUCTURE = NUMERIC STRING

(*****************************************************************************)
(* Really ought to go to template x500info now for DN... (Ddirn <-> 5name).  *)
(*****************************************************************************)
DirectoryName              LABEL     = Ddirn
                           STRUCTURE = CHOICE
                           TAG       = (C 0 C)
                           CHILDREN  = { <Drdns, U 16 C,O,0> }

RDNSequence                LABEL     = Drdns
                           STRUCTURE = SEQUENCE OF
                           LIMIT     = 0
                           CHILDREN  = { <Drdnm, U 17 C,O,0> }

RelativeDistinguishedName  LABEL     = Drdnm
                           STRUCTURE = SET OF
                           LIMIT     = 0
                           CHILDREN  = { <Davas, U 16 C,O,0> }

AttributeValueAssertion    LABEL     = Davas
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dobid, U  6 P,M,0>,
                                         <Datrv, U  0 P,M,0> }

(*****************************************************************************)
(* strictly AttributeValue should be type ANY.  But ...                      *)
(*****************************************************************************)
attribute value            LABEL     = Datrv
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Datrp, U 19 P,O,0>,
                                         <Datrx, U 20 P,O,0>}

AttributeValue             LABEL     = Datrp
                           STRUCTURE = PRINTABLE STRING

AttributeValue             LABEL     = Datrx
                           STRUCTURE = TELETEX STRING

ObjectIdentifier           LABEL     = Dobid
                           STRUCTURE = OBJECT IDENTIFIER

(*****************************************************************************)
(* (N) address                                                               *)
(*                                                                           *)
(* The presentation addresses below are correctly defined with tags for each *)
(* of the P, S, T selectors and the N address.                               *)
(*****************************************************************************)
N ADDRESS                  LABEL     = Dnadd
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dpslt, C 0 C,O,0>D,
                                         <Dsslt, C 1 C,O,0>D,
                                         <Dtslt, C 2 C,O,0>D,
                                         <Dnett, C 3 C,M,0>D }

P Selector tag             LABEL     = Dpslt
                           STRUCTURE = TAG
                           CHILDREN  = { <Dpsel, U 4 P,M,0>D }

P Selector                 LABEL     = Dpsel
                           STRUCTURE = OCTETSTRING

S Selector tag             LABEL     = Dsslt
                           STRUCTURE = TAG
                           CHILDREN  = { <Dssel, U 4 P,M,0>D }

S Selector                 LABEL     = Dssel
                           STRUCTURE = OCTETSTRING

T Selector tag             LABEL     = Dtslt
                           STRUCTURE = TAG
                           CHILDREN  = { <Dtsel, U 4 P,M,0>D }

T Selector                 LABEL     = Dtsel
                           STRUCTURE = OCTETSTRING

N Address tag              LABEL     = Dnett
                           STRUCTURE = TAG
                           CHILDREN  = { <Dneta, U 17 C,M,0>D }

N Address                  LABEL     = Dneta
                           STRUCTURE = SET OF
                           CHILDREN  = { <Dnsqo, U 4 P,M,0> }



N ADDRESS, prompt for node LABEL     = Dnadc
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dpstc, C 0 C,O,0>,
                                         <Dsstc, C 1 C,O,0>,
                                         <Dtstc, C 2 C,O,0>,
                                         <Dnttc, C 3 C,M,0> }

P Selector tag (cons)      LABEL     = Dpstc
                           STRUCTURE = TAG
                           CHILDREN  = { <Dpslc, U 4 P,M,0> }

P Selector (cons)          LABEL     = Dpslc
                           STRUCTURE = OCTETSTRING

S Selector tag (cons)      LABEL     = Dsstc
                           STRUCTURE = TAG
                           CHILDREN  = { <Dsslc, U 4 P,M,0> }

S Selector (cons)          LABEL     = Dsslc
                           STRUCTURE = OCTETSTRING

T Selector tag (cons)      LABEL     = Dtstc
                           STRUCTURE = TAG
                           CHILDREN  = { <Dtslc, U 4 P,M,0> }

T Selector (cons)          LABEL     = Dtslc
                           STRUCTURE = OCTETSTRING

N Address tag (cons)       LABEL     = Dnttc
                           STRUCTURE = TAG
                           CHILDREN  = { <Dnetc, U 17 C,M,0> }

N Address  (cons)          LABEL     = Dnetc
                           STRUCTURE = SET OF
                           CHILDREN  = { <Dnsqo, U 4 P,M,0> }

N Address String           LABEL     = Dnsqo
                           STRUCTURE = OCTETSTRING



GlobalDomainId             LABEL     = Dgbid
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dctry, A  1 C,M,0> E,
                                         <Dadmd, A  2 C,M,0>,
                                         <Dpdid, U  0 P,O,0> E }

PrivateDomainIdentifier    LABEL     = Dpdid
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Dprmn, U 18 S,O,16>,
                                         <Dprmp, U 19 S,O,16> }

(*****************************************************************************)
(* PRIORITY                                                                  *)
(*****************************************************************************)
Priority                   LABEL     = Dprty
                           STRUCTURE = INTEGER
!
