# Acronyms

Def:
Institute of Electrical and Electronics Engineers


# DEs

DEFINITION:
Integer with a bad section of ASN.1 in the middle of the keywords,

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-CostPreferenceAmount" >
      <xs:restriction base="xs:unsignedShort">
         <xs:maxInclusive value="999"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(SIZE(8))
-- format as: YYYYMMDD where 
-- YYYY  the year, in common era units
-- MM  the month, range 01 to 12
-- DD the day, range 01 to 31
-- use zero for MM an  DD when not applicable

KEYWORD:
Directory, Search Request, Radius, Search,Proximity

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-Date" >
      <xs:annotation>
         <xs:documentation>       
            format as: YYYYMMDD where
            YYYY  the year,  in common era units
            MM  the month,  range 01 to 12
            DD the day,  range 01 to 31
            use zero for MM an  DD when not applicable
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:length value="8"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Bit string with ENUMERATION and a fixed size.  This bit of ASN.1 is now outdated but still appears in the dictionary.  Use it as a test case for the "NONE" logic which states that if the tag of the XML entry has been set to be "NONE" then we skip the rendering of the XML (or its automatic updating) and we do not render that content part (regardless of contents) when we build a word document.  More typical, this test case will be used for entries that would never be sent as XML.

VALID-VALUE-RULE:
{
     sunday            (0), 
     monday            (1), 
     tuesday           (2), 
     wednesday         (3), 
     thursday          (4), 
     friday            (5), 
     saturday          (6), 
     includeHolidays   (7)
     } (SIZE(8))
-- Do not use, test case only

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-DayOfWeek-item" >
      <xs:annotation>
         <xs:appinfo>
            sunday (0)
            monday (1)
            tuesday (2)
            wednesday (3)
            thursday (4)
            friday (5)
            saturday (6)
            includeHolidays (7)
         </xs:appinfo>
         <xs:documentation>       
            Do not use,  test case only
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:int">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="7"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="sunday"/>
               <xs:enumeration value="monday"/>
               <xs:enumeration value="tuesday"/>
               <xs:enumeration value="wednesday"/>
               <xs:enumeration value="thursday"/>
               <xs:enumeration value="friday"/>
               <xs:enumeration value="saturday"/>
               <xs:enumeration value="includeHolidays"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>
<xs:simpleType name="Test-ATIS-DayOfWeek">
   <xs:list itemType="Test-ATIS-DayOfWeek-item"/>
</xs:simpleType>


DEFINITION:
simple ENUMERATION with cont range of values

VALID-VALUE-RULE:
{
     crossStreets           (0), 
     geometry               (1), 
     grid                   (2), 
     address                (3), 
     geographicCoordinates  (4),
     linearReference        (5), 
     mdi                    (6),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use
     -- Do not use, revised definitions are available in the LRMS effort

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-LocationType" >
      <xs:annotation>
         <xs:appinfo>
            crossStreets (0)
            geometry (1)
            grid (2)
            address (3)
            geographicCoordinates (4)
            linearReference (5)
            mdi (6)
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
            Do not use,  revised definitions are available in the LRMS effort
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="6"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="crossStreets"/>
               <xs:enumeration value="geometry"/>
               <xs:enumeration value="grid"/>
               <xs:enumeration value="address"/>
               <xs:enumeration value="geographicCoordinates"/>
               <xs:enumeration value="linearReference"/>
               <xs:enumeration value="mdi"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
A simple ENUMERATION with cont range of values but also with bad ASN code added to try and much the parser up

VALID-VALUE-RULE:
{
     mustContain        (0), 
     shouldContain      (1),
     shouldNotContain   (2), 
     mustNotContain     (3), -- ands so on,,,,,
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

KEYWORD:
Directory Entry,Price, Days, Business Hours, Price Schedule

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-SearchOperator" >
      <xs:annotation>
         <xs:appinfo>
            mustContain (0)
            shouldContain (1)
            shouldNotContain (2)
            mustNotContain (3) -- ands so on ,
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="3"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="mustContain"/>
               <xs:enumeration value="shouldContain"/>
               <xs:enumeration value="shouldNotContain"/>
               <xs:enumeration value="mustNotContain"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
Simple bounded string, with uneven comment indenting to cope with

VALID-VALUE-RULE:
(SIZE(6..11))  --test case
-- Format:  HHMMSSssss 
-- Valid times using 24 hour notation.  
-- HH=00 through 23; MM=00 through 59; 
      -- SS=00 through 59; 00 if NA
-- ssss=0000 through 9999. 
 -- Use SS= 60 for leap seconds
-- HH represents hours, MM minutes, SS seconds, 
-- and ssss decimal seconds to whatever number 
-- of significant digits is required (up to four)

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-Time" >
      <xs:annotation>
         <xs:documentation>       
            test case
            Format:  HHMMSSssss
            Valid times using 24 hour notation.
            HH=00 through 23; MM=00 through 59;
            SS=00 through 59; 00 if NA
            ssss=0000 through 9999.
            Use SS= 60 for leap seconds
            HH represents hours,  MM minutes,  SS seconds,
            and ssss decimal seconds to whatever number
            of significant digits is required  (up to four)
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:minLength value="6"/>
         <xs:maxLength value="11"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(SIZE(37)) 
-- wrapper for an RDS TMC broadcast message

XML-SCHEMA:
<xs:simpleType name="Test-Broadcast-Wrapper" >
      <xs:annotation>
         <xs:documentation>       
            wrapper for an RDS TMC broadcast message
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="binary">
         <xs:length value="37"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(SIZE(1..255))
-- use defined by ISP
-- formerly was an unlimited length OCTECT string

XML-SCHEMA:
<xs:simpleType name="Test-Device-Identity" >
      <xs:annotation>
         <xs:documentation>       
            use defined by ISP
            formerly was an unlimited length OCTECT string
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:minLength value="1"/>
         <xs:maxLength value="255"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Simple bounded Integer, very large unsigned values

VALID-VALUE-RULE:
(0..4294967294)
-- Units of gross bits per second (BPS)

XML-SCHEMA:
<xs:simpleType name="Test-Device-TransferSpeed" >
      <xs:annotation>
         <xs:documentation>       
            Units of gross bits per second  (BPS)
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:unsignedInt">
         <xs:maxInclusive value="4294967294"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(SIZE(1..3))
     -- Valid International Access Country Code

XML-SCHEMA:
<xs:simpleType name="Test-Traveler-InternationalAccessCode" >
      <xs:annotation>
         <xs:documentation>       
            Valid International Access Country Code
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:pattern value="\d*"/>  
         <xs:minLength value="1"/>
         <xs:maxLength value="3"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Unbounded string, valid as ASN.1 test case (but any use of this sort of open value has been removed in almost all the ATIS work)

VALID-VALUE-RULE:
-- Any combo of numbers, charecters and dashes
-- when two such values are to be compared, the dash
-- marks shall not be considered

XML-SCHEMA:
<xs:simpleType name="Test-ConfirmationNumber" >
      <xs:annotation>
         <xs:documentation>       
            Any combo of numbers,  charecters and dashes
            when two such values are to be compared,  the dash
            marks shall not be considered
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string"/>
</xs:simpleType>


VALID-VALUE-RULE:
(SIZE(1..2194303))
-- revised to be 2 Meg max size from unlimited

XML-SCHEMA:
<xs:complexType name="Test-DirectoryEntry-ExtendedInfo" >
   <xs:simpleContent>
      <xs:annotation>
         <xs:documentation>       
            revised to be 2 Meg max size from unlimited
         </xs:documentation>
      </xs:annotation>
      <xs:extension base="Test-DirectoryEntry-ExtendedInfo-string" >
         <xs:attribute name="EncodingType" use="required">
           <xs:simpleType>
              <xs:restriction base="xs:NMTOKEN">
                 <xs:enumeration value="base64Binary"/>
              </xs:restriction>
           </xs:simpleType>
         </xs:attribute>
      </xs:extension>
   </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="Test-DirectoryEntry-ExtendedInfo-string">
   <xs:restriction base="xs:base64Binary">
      <xs:minLength value="2"/>
      <xs:maxLength value="2925738"/>
   </xs:restriction>
</xs:simpleType >


VALID-VALUE-RULE:
-- TRUE if extended data entry is avilable to send

XML-SCHEMA:
<xs:simpleType name="Test-DirectoryEntry-ExtendedInfoAvail" >
      <xs:annotation>
         <xs:documentation>       
            TRUE if extended data entry is avilable to send
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:boolean"/> 
</xs:simpleType>


VALID-VALUE-RULE:
{
     anyTypeValidOnlyOnRequest  (0), 
     text                       (1),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xs:simpleType name="Test-DirectoryEntry-ExtendedInfoType" >
      <xs:annotation>
         <xs:appinfo>
            anyTypeValidOnlyOnRequest (0)
            text (1)
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="1"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="anyTypeValidOnlyOnRequest"/>
               <xs:enumeration value="text"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
A long ENUMERATION test case, but also one that starts with garbage in the first line in the form of a legal comment

VALID-VALUE-RULE:
{   -- this is a test comment
     adoption                     (0), 
     agriculture                  (1),
     alcoholDrugAbusePrograms     (2),
     animalControl                (3),
     assessor                     (4),
     attorneysAndProsecutors      (5),
     birthRecords                 (6),
     boards                       (7), 
     permitsAndInspections        (8),
     childAbuseReporting          (9), 
     civilService                (10), 
     coastal                     (11),  
     consumerComplaintsServices  (12),
     coroner                     (13), 
     courts                      (14),
     customs                     (15),
     deathRecords                (16),
     motorVehicles               (17),
     disabilityServices          (18),
     disasterPreparedness        (19),
     discrimination              (20),
     employmentServices          (21),
     eneryInformationServices    (22),
     environmentalServices       (23),
     foodStamps                  (24),
     fosterCare                  (25),
     garbageAndTrashServices     (26),
     hazardousMaterials          (27),
     healthServices              (28),
     housingServices             (29),
     immigrationServices         (30),
     jailsPenalServices          (31), 
     laborServices               (32), 
     libraries                   (33), 
     marriageServices            (34),
     medicalServices             (35), 
     medicare                    (36),
     military                    (37),
     nationalGuard               (38),
     neighborhoodWatch           (39),
     osha                        (40),
     parksRecreation             (41),
     passportServices            (42),
     postalOffices               (43), 
     probationParole             (44), 
     publicDefender              (45), 
     publicUtilities             (46), 
     recyclingInformation        (47), 
     schools                     (48),
     seniorCitizensServices      (49),
     smallBusinessAdministration (50),
     socalSecurity               (51),
     streetMaintenance           (52),
     suicidePrevention           (53),
     taxInformation              (54),
     unemploymentInsurance       (55),
     utilityService              (56),
     veteransServices            (57),
     victimWitnessAssistance     (58),
     voterRegistration           (59),
     weightsAndMeasures          (60),
     workersCompensation         (61),
     youthInformationServices    (62),
     zoningInformation           (63),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xs:simpleType name="Test-DirectoryEntry-GovernmentSubType" >
      <xs:annotation>
         <xs:appinfo>
             -- this is a test comment
            adoption (0)
            agriculture (1)
            alcoholDrugAbusePrograms (2)
            animalControl (3)
            assessor (4)
            attorneysAndProsecutors (5)
            birthRecords (6)
            boards (7)
            permitsAndInspections (8)
            childAbuseReporting (9)
            civilService (10)
            coastal (11)
            consumerComplaintsServices (12)
            coroner (13)
            courts (14)
            customs (15)
            deathRecords (16)
            motorVehicles (17)
            disabilityServices (18)
            disasterPreparedness (19)
            discrimination (20)
            employmentServices (21)
            eneryInformationServices (22)
            environmentalServices (23)
            foodStamps (24)
            fosterCare (25)
            garbageAndTrashServices (26)
            hazardousMaterials (27)
            healthServices (28)
            housingServices (29)
            immigrationServices (30)
            jailsPenalServices (31)
            laborServices (32)
            libraries (33)
            marriageServices (34)
            medicalServices (35)
            medicare (36)
            military (37)
            nationalGuard (38)
            neighborhoodWatch (39)
            osha (40)
            parksRecreation (41)
            passportServices (42)
            postalOffices (43)
            probationParole (44)
            publicDefender (45)
            publicUtilities (46)
            recyclingInformation (47)
            schools (48)
            seniorCitizensServices (49)
            smallBusinessAdministration (50)
            socalSecurity (51)
            streetMaintenance (52)
            suicidePrevention (53)
            taxInformation (54)
            unemploymentInsurance (55)
            utilityService (56)
            veteransServices (57)
            victimWitnessAssistance (58)
            voterRegistration (59)
            weightsAndMeasures (60)
            workersCompensation (61)
            youthInformationServices (62)
            zoningInformation (63)
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="63"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="adoption"/>
               <xs:enumeration value="agriculture"/>
               <xs:enumeration value="alcoholDrugAbusePrograms"/>
               <xs:enumeration value="animalControl"/>
               <xs:enumeration value="assessor"/>
               <xs:enumeration value="attorneysAndProsecutors"/>
               <xs:enumeration value="birthRecords"/>
               <xs:enumeration value="boards"/>
               <xs:enumeration value="permitsAndInspections"/>
               <xs:enumeration value="childAbuseReporting"/>
               <xs:enumeration value="civilService"/>
               <xs:enumeration value="coastal"/>
               <xs:enumeration value="consumerComplaintsServices"/>
               <xs:enumeration value="coroner"/>
               <xs:enumeration value="courts"/>
               <xs:enumeration value="customs"/>
               <xs:enumeration value="deathRecords"/>
               <xs:enumeration value="motorVehicles"/>
               <xs:enumeration value="disabilityServices"/>
               <xs:enumeration value="disasterPreparedness"/>
               <xs:enumeration value="discrimination"/>
               <xs:enumeration value="employmentServices"/>
               <xs:enumeration value="eneryInformationServices"/>
               <xs:enumeration value="environmentalServices"/>
               <xs:enumeration value="foodStamps"/>
               <xs:enumeration value="fosterCare"/>
               <xs:enumeration value="garbageAndTrashServices"/>
               <xs:enumeration value="hazardousMaterials"/>
               <xs:enumeration value="healthServices"/>
               <xs:enumeration value="housingServices"/>
               <xs:enumeration value="immigrationServices"/>
               <xs:enumeration value="jailsPenalServices"/>
               <xs:enumeration value="laborServices"/>
               <xs:enumeration value="libraries"/>
               <xs:enumeration value="marriageServices"/>
               <xs:enumeration value="medicalServices"/>
               <xs:enumeration value="medicare"/>
               <xs:enumeration value="military"/>
               <xs:enumeration value="nationalGuard"/>
               <xs:enumeration value="neighborhoodWatch"/>
               <xs:enumeration value="osha"/>
               <xs:enumeration value="parksRecreation"/>
               <xs:enumeration value="passportServices"/>
               <xs:enumeration value="postalOffices"/>
               <xs:enumeration value="probationParole"/>
               <xs:enumeration value="publicDefender"/>
               <xs:enumeration value="publicUtilities"/>
               <xs:enumeration value="recyclingInformation"/>
               <xs:enumeration value="schools"/>
               <xs:enumeration value="seniorCitizensServices"/>
               <xs:enumeration value="smallBusinessAdministration"/>
               <xs:enumeration value="socalSecurity"/>
               <xs:enumeration value="streetMaintenance"/>
               <xs:enumeration value="suicidePrevention"/>
               <xs:enumeration value="taxInformation"/>
               <xs:enumeration value="unemploymentInsurance"/>
               <xs:enumeration value="utilityService"/>
               <xs:enumeration value="veteransServices"/>
               <xs:enumeration value="victimWitnessAssistance"/>
               <xs:enumeration value="voterRegistration"/>
               <xs:enumeration value="weightsAndMeasures"/>
               <xs:enumeration value="workersCompensation"/>
               <xs:enumeration value="youthInformationServices"/>
               <xs:enumeration value="zoningInformation"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
Simple integer test case, 2 byte length case. The one test when the top range is equal to the limit.

XML-SCHEMA:
<xs:simpleType name="Test-DirectorySearch-LimitReturns" >
      <xs:annotation>
         <xs:documentation>       
            max entries to return
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:unsignedShort">
         <xs:minInclusive value="10"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Unbounded OCTET test case.  This is NOT a Simple test case of another type def being used (if it was the OCTET would be the keyword LRMS).

VALID-VALUE-RULE:
(SIZE(10..20))
-- LRMS
-- Location Reference
 -- Expands to all vaild LRMS profiles
-- Do not use

VALUE-DOMAIN:
Spatial Data Interoperability Protocol for ITS Project (DRAFT)

XML-SCHEMA:
<xs:complexType name="Test-DirectorySearch-Location" >
   <xs:simpleContent>
      <xs:annotation>
         <xs:documentation>       
            LRMS
            Location Reference
            Expands to all vaild LRMS profiles
            Do not use
         </xs:documentation>
      </xs:annotation>
      <xs:extension base="Test-DirectorySearch-Location-string" >
         <xs:attribute name="EncodingType" use="required">
           <xs:simpleType>
              <xs:restriction base="xs:NMTOKEN">
                 <xs:enumeration value="base64Binary"/>
              </xs:restriction>
           </xs:simpleType>
         </xs:attribute>
      </xs:extension>
   </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="Test-DirectorySearch-Location-string">
   <xs:restriction base="xs:base64Binary">
      <xs:minLength value="14"/>
      <xs:maxLength value="27"/>
   </xs:restriction>
</xs:simpleType >


DEFINITION:
Simple fixed length string test case with comments

VALID-VALUE-RULE:
(SIZE(3))
-- Three character code for airport
-- as per airline industry stds

XML-SCHEMA:
<xs:simpleType name="Test-Flight-OriginAirport" >
      <xs:annotation>
         <xs:documentation>       
            Three character code for airport
            as per airline industry stds
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:length value="3"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
ENUMERATION case with embedded complex comment rules to extract and add to app info section

VALID-VALUE-RULE:
{
     noEntry         (0),  
     at-10-OrLess    (1),  -- 10%OrLess
     at-20-OrLess    (2),  -- 20%OrLess   
     at-30-OrLess    (3),  -- 30%OrLess   
     at-40-OrLess    (4),  -- 40%OrLess    
     at-50-OrLess    (5),  -- 50%OrLess
     at-60-OrLess    (6),  -- 60%OrLess
     at-70-OrLess    (7),  -- 70%OrLess
     at-80-OrLess    (8),  -- 80%OrLess
     at-90-OrLess    (9),  -- 90%OrLess
     empty          (10),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xs:simpleType name="Test-Lot-Status" >
      <xs:annotation>
         <xs:appinfo>
            noEntry (0)
            at 10 OrLess (1) -- 10%OrLess
            at 20 OrLess (2) -- 20%OrLess
            at 30 OrLess (3) -- 30%OrLess
            at 40 OrLess (4) -- 40%OrLess
            at 50 OrLess (5) -- 50%OrLess
            at 60 OrLess (6) -- 60%OrLess
            at 70 OrLess (7) -- 70%OrLess
            at 80 OrLess (8) -- 80%OrLess
            at 90 OrLess (9) -- 90%OrLess
            empty (10)
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="10"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="noEntry"/>
               <xs:enumeration value="at 10 OrLess"/>
               <xs:enumeration value="at 20 OrLess"/>
               <xs:enumeration value="at 30 OrLess"/>
               <xs:enumeration value="at 40 OrLess"/>
               <xs:enumeration value="at 50 OrLess"/>
               <xs:enumeration value="at 60 OrLess"/>
               <xs:enumeration value="at 70 OrLess"/>
               <xs:enumeration value="at 80 OrLess"/>
               <xs:enumeration value="at 90 OrLess"/>
               <xs:enumeration value="empty"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
Integer test case (from the actual std) where there are enumerations present.  I am not sure this is legal ASN1 (doubt it), and it should be redone as a ENUMERATION to be correct.  What will the translation rules make of it.

XML-SCHEMA:
<xs:simpleType name="Test-Link-speed" >
      <xs:restriction base="xs:unsignedByte">
         <xs:maxInclusive value="15"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Simple small bit string case, but with both global defines (that should be in-line) and with comments present.  Note how the comments are no longer carried over, but now in the XML (without the context of the global defined) they are out of context and should be dropped by hand editing.

VALID-VALUE-RULE:
(SIZE(2))

     in-and-out-common   Mapping-seg ::= '00'B 
                -- Both IN and OUT links use one common set of data
     only-OUT            Mapping-seg ::= '01'B 
                -- Data which follows applies to OUT bound link only
     only-IN             Mapping-seg ::= '10'B 
                -- Data which follows applies to IN bound link only
     in-and-out-unique   Mapping-seg ::= '11'B 
                -- Both IN and OUT links use unique set of data (2 sets)

XML-SCHEMA:
<xs:simpleType name="Test-Mapping-seg" >
      <xs:restriction base="binary">
         <xs:length value="2"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(-127..127)  
-- yes the uneven nature is correct

XML-SCHEMA:
<xs:simpleType name="Test-The-Delta" >
      <xs:annotation>
         <xs:documentation>       
            yes the uneven nature is correct
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:byte">
         <xs:minInclusive value="-127"/>
      </xs:restriction>
</xs:simpleType>

DRCCC-COMMENTS:
<DCK>comment here.</DCK>
<Bob>Here is another comment text</Bob>


DEFINITION:
Simple integer, range test case (bottom min is one less then the normally found max value).

XML-SCHEMA:
<xs:simpleType name="Test-The-Grid" >
      <xs:restriction base="xs:short">
         <xs:minInclusive value="-32767"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Simple integer, range test case.   NOTE: This value range is just too large for visual basic to cope with, it is not a problem for the XML rules, but some special work will be needed in min-edit to handle such a value.  The negative sign of the value range provides a wider test case than the other one.  Rework the logic for this to extract it as a compound string rather than as a number.

XML-SCHEMA:
<xs:simpleType name="Test-The-LL" >
      <xs:restriction base="xs:int">
         <xs:minInclusive value="-1234567890"/>
         <xs:maxInclusive value="9876543210"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Simple unsigned byte range Integer test case

XML-SCHEMA:
<xs:simpleType name="Test-DirectoryEntry-LocationType" >
      <xs:restriction base="xs:unsignedByte">
         <xs:maxInclusive value="155"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Unbounded OCTET string.  Valid as ASN test case (but any use of this sort of open value has been removed in almost all the ATIS work)  Observe that having "zero" as a lower bound makes little real world sense.

VALID-VALUE-RULE:
(SIZE(0..14))
-- any encoding the data source owner wishes to use

XML-SCHEMA:
<xs:complexType name="Test-DatabaseNumber" >
   <xs:simpleContent>
      <xs:annotation>
         <xs:documentation>       
            any encoding the data source owner wishes to use
         </xs:documentation>
      </xs:annotation>
      <xs:extension base="Test-DatabaseNumber-string" >
         <xs:attribute name="EncodingType" use="required">
           <xs:simpleType>
              <xs:restriction base="xs:NMTOKEN">
                 <xs:enumeration value="base64Binary"/>
              </xs:restriction>
           </xs:simpleType>
         </xs:attribute>
      </xs:extension>
   </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="Test-DatabaseNumber-string">
   <xs:restriction base="xs:base64Binary">
      <xs:minLength value="0"/>
      <xs:maxLength value="19"/>
   </xs:restriction>
</xs:simpleType >


DEFINITION:
A simple ENUMERATION with cont range of values formatted all on a run-on line as per the more recent style that TMDD has used.  Also has a missing range gap (value 11).

XML-SCHEMA:
<xs:simpleType name="Test-RunOnEnumZ" >
      <xs:annotation>
         <xs:appinfo>
            item10 (10)
            item12 (12)
            item13 (13)
            item14 (14)
         </xs:appinfo>
         <xs:documentation>       
            a run on test case
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="10"/>
               <xs:maxInclusive value="14"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="item10"/>
               <xs:enumeration value="item12"/>
               <xs:enumeration value="item13"/>
               <xs:enumeration value="item14"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


XML-SCHEMA:
<xs:simpleType name="Test-Item-byte-cnt" >
      <xs:restriction base="xs:short">
         <xs:minInclusive value="-123"/>
         <xs:maxInclusive value="+511"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
A large Integer test case.  Note that the comment reflecting binary/hex value have not real place in XML, might be the sort of things we edit out manually.

VALID-VALUE-RULE:
(-90000000..90000000) -- latitude
     -- Valid Encoding rules, a signed 32 bit value
     -- none(0x00) - no latitude value available
     -- range (0xEA8AD600..0x15752A00)  29th  bit = 1 micro degree
     -- invalid (0xFFFFFFFF) latitude solution is not valid

XML-SCHEMA:
<xs:simpleType name="Test-Location-lat" >
      <xs:annotation>
         <xs:documentation>       
            latitude
            Valid Encoding rules,  a signed 32 bit value
            none (0x00)  - no latitude value available
            range  (0xEA8AD600..0x15752A00)   29th  bit = 1 micro degree
            invalid  (0xFFFFFFFF)  latitude solution is not valid
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:int">
         <xs:minInclusive value="-90000000"/>
         <xs:maxInclusive value="90000000"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
A simple integer test case for the XML, but the comment conveys some internal encoding rules found in the LRMS work that will be reflect only as comment in the XML.  Seems like a good test case for "buyer beware" syndrome.

VALID-VALUE-RULE:
(0..65535) -- altitude
     -- Valid Encoding rules, an unsigned 16 bit value 
     -- with an offset 0x1000 as zero point
     -- invalid (0xFFFF) altitude solution is not valid or unknown
     -- std defines unknown and invalid as the same here

XML-SCHEMA:
<xs:simpleType name="Test-Location-alt" >
      <xs:annotation>
         <xs:documentation>       
            altitude
            Valid Encoding rules,  an unsigned 16 bit value
            with an offset 0x1000 as zero point
            invalid  (0xFFFF)  altitude solution is not valid or unknown
            std defines unknown and invalid as the same here
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:unsignedShort"/>
</xs:simpleType>


DEFINITION:
Very large Integer value test case.  This might be better formatted as a bit string of 32 bits

NOTE: This value range is just too large for visual basic to cope with, it is not a problem for the XML rules, but some special work will be needed in min-edit to handle such a value.

VALID-VALUE-RULE:
(0..4294967295)  
     -- beacon identification number (32 bit value)    
     -- set to 0x0 is no beacon data present

XML-SCHEMA:
<xs:simpleType name="Test-Beacon-id" >
      <xs:annotation>
         <xs:documentation>       
            beacon identification number  (32 bit value)
            set to 0x0 is no beacon data present
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:unsignedInt"/>
</xs:simpleType>


DEFINITION:
Complex bit string test case, in fact this should resolve to a simple bit string as the ENUMERATION defined are all global in scope and thus will be skipped over in this format.  Note that the binary bit ordering has no place in the XML rules, should we have addressed that?

VALID-VALUE-RULE:
(SIZE(16)) -- message received status bits    

     received-okay            Ack ::= '0001'H -- may not be set if 'garbled' is set  
     garbled                  Ack ::= '0002'H -- may not be set if received okay is set   
     do-not-retry             Ack ::= '0004'H                    
     go-to-voice-mode-now     Ack ::= '0008'H                    
     send-delta-positions     Ack ::= '0010'H                    
     send-private-data-types  Ack ::= '0020'H

XML-SCHEMA:
<xs:simpleType name="Test-Ack" >
      <xs:annotation>
         <xs:documentation>       
            message received status bits
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="binary">
         <xs:length value="16"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Complex out of range bit string ENUMERATION where the defined are global and therefore should not be added to the XML (unless they were reformatted to be inside as it more typical)

VALID-VALUE-RULE:
(SIZE(8))

     holiday   Day-of-week ::= '10000000'B 
     sunday    Day-of-week ::= '01000000'B 
     monday    Day-of-week ::= '00100000'B 
     tuesday   Day-of-week ::= '00010000'B 
     wednesday Day-of-week ::= '00001000'B 
     thursday  Day-of-week ::= '00000100'B 
     friday    Day-of-week ::= '00000010'B 
     saturday  Day-of-week ::= '00000001'B

XML-SCHEMA:
<xs:simpleType name="Test-Day-of-week" >
      <xs:restriction base="binary">
         <xs:length value="8"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
An ENUMERATION test case.  The comment from this came from a Std that spec-ed things at the bit level and so we have binary data in the comments.  These have no place in XML, perhaps we manually edit such comments?

XML-SCHEMA:
<xs:simpleType name="Test-Free-Flow-Rate" >
      <xs:annotation>
         <xs:appinfo>
unknown (0) -- '0000'B
under 20 mph (1) -- '0001'B
under 25 mph (2) -- '0010'B
under 30 mph (3) -- '0011'B
under 35 mph (4) -- '0100'B
under 40 mph (5) -- '0101'B
under 45 mph (6) -- '0110'B
under 50 mph (7) -- '0111'B
under 55 mph (8) -- '1000'B
under 60 mph (9) -- '1001'B
under 65 mph (10) -- '1010'B
under 70 mph (11) -- '1011'B
under 75 mph (12) -- '1100'B
under 80 mph (13) -- '1101'B
can not be traversed by public (14) -- '1110'B
can not be transversed blocked (15) -- '1111'B
         </xs:appinfo>
         <xs:documentation>       
            (0..15)
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="15"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="unknown"/>
               <xs:enumeration value="under 20 mph"/>
               <xs:enumeration value="under 25 mph"/>
               <xs:enumeration value="under 30 mph"/>
               <xs:enumeration value="under 35 mph"/>
               <xs:enumeration value="under 40 mph"/>
               <xs:enumeration value="under 45 mph"/>
               <xs:enumeration value="under 50 mph"/>
               <xs:enumeration value="under 55 mph"/>
               <xs:enumeration value="under 60 mph"/>
               <xs:enumeration value="under 65 mph"/>
               <xs:enumeration value="under 70 mph"/>
               <xs:enumeration value="under 75 mph"/>
               <xs:enumeration value="under 80 mph"/>
               <xs:enumeration value="can not be traversed by public"/>
               <xs:enumeration value="can not be transversed blocked"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
Simple bit string, but the default line (also a legal keyword in ASN1) is not handled by the XML rule set.  Does XML allow such a default value to be created in the schema, will need to research this.

XML-SCHEMA:
<xs:simpleType name="Test-Grid-status" >
      <xs:annotation>
         <xs:documentation>       
DEFAULT ('0000'B)
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="binary">
         <xs:length value="4"/>
      </xs:restriction>
</xs:simpleType>


VALID-VALUE-RULE:
(1..999999)
-- LSB units of 1/10th of a mile

XML-SCHEMA:
<xs:simpleType name="Test-Trip-MilesToNextManeuver" >
      <xs:annotation>
         <xs:documentation>       
            LSB units of 1/10th of a mile
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:unsignedInt">
         <xs:minInclusive value="1"/>
         <xs:maxInclusive value="999999"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Simple short num string test case, fixed length.

VALID-VALUE-RULE:
(SIZE(10))
-- Valid Phone Number
-- Do not use, depreciated

XML-SCHEMA:
<xs:simpleType name="Test-DirectoryEntry-Phone" >
      <xs:annotation>
         <xs:documentation>       
            Valid Phone Number
            Do not use,  depreciated
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:pattern value="\d*"/>  
         <xs:length value="10"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Enumerated test case.  Complex formatting, complex comment in line and below as well as global, use of the brackets "{" inside comments.  Broken ranges of enumeration values provide some further processing problems (ideally dealt with by a union but not yet programmed to do so).  In fact a real pain of a test case.  Note also that some of the ASN.1 comment text has special chars to XML and has to be processed and converted to escape sequences.

VALID-VALUE-RULE:
{
     lowestCost               (0), 
     maximumCost              (1), -- test comment here
     minimumCost              (2), 
     highValue                (24), -- test {item} here
     targetCost               (3), 
     lowValue               (+23), -- use a < char here
     targetCost2               (4), 
             -- a comment below it
     targetCost3               (5), -- a comment on the line
    -- and one below it
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xs:simpleType name="Test-ATIS-CostPreference" >
      <xs:annotation>
         <xs:appinfo>
            lowestCost (0)
            maximumCost (1) -- test comment here
            minimumCost (2)
            highValue (24) -- test  {item}  here
            targetCost (3)
            lowValue (23) -- use a &lt; char here
            targetCost2 (4) -- a comment below it
            targetCost3 (5) -- a comment on the line
             -- and one below it
         </xs:appinfo>
         <xs:documentation>       
            values to 127 reserved for std use
            values 128 to 255 reserved for local use
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="24"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="lowestCost"/>
               <xs:enumeration value="maximumCost"/>
               <xs:enumeration value="minimumCost"/>
               <xs:enumeration value="highValue"/>
               <xs:enumeration value="targetCost"/>
               <xs:enumeration value="lowValue"/>
               <xs:enumeration value="targetCost2"/>
               <xs:enumeration value="targetCost3"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
The enum with defines re-done properly as local (rather than global, note that the backward numbering it to keep with the older style which was done that way to match with ASN encoding rules.

NOTE that the conversion routines do not yet parse out the binary values, so this is a case where hand editing to add the enum sets back in would be needed (unless we write more code to deal with this case).

XML-SCHEMA:
<xs:simpleType name="Test-Day-of-week-V2" >
      <xs:restriction base="binary">
         <xs:length value="8"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
The wind direction, in a points of the compass format.   This a simple example of the use of a part of the ITIS codes and represents a common "value domain" used in ITS.  As a test case we want to extract the right strings and keep the produced enumeration in strict alignment with the actual ITIS code lists.

XML-SCHEMA:
<xs:simpleType name="Test-Weather-WindDirection" >
      <xs:annotation>
         <xs:documentation>       
            this includes the following values
            north        (7998) ,
            south        (7999) ,
            east         (8000) ,
            west         (8001) ,
            northeast    (8002) ,
            northwest    (8003) ,
            southeast    (8004) ,
            southwest    (8005)
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="ITIScodes">
         <xs:minInclusive value="7998"/>
         <xs:maxInclusive value="8005"/>
      </xs:restriction>
</xs:simpleType>

REMARKS:
In this edition, these values have been replaced with suitable ITIS codes representing the same concepts.


DEFINITION:
An ITIS test case, the ITIS code for generic locations beside a lane, from 1512 dot one.

VALID-VALUE-RULE:
(7936..8191)
-- the ITIS code for generic locations beside a lane 
-- such as: opposing lanes, on ramps, etc...

XML-SCHEMA:
<xs:simpleType name="Test-locations" >
      <xs:annotation>
         <xs:documentation>       
            the ITIS code for generic locations beside a lane
            such as: opposing lanes,  on ramps,  etc ...
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="ITIScodes">
         <xs:minInclusive value="7936"/>
         <xs:maxInclusive value="8191"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
An ITIS test case, the ITIS codes for various conditions for the lane, from a 1512 dot one use.

VALID-VALUE-RULE:
(768..1023)   	
-- the ITIS codes for various conditions for the lane
-- such as: blocked, closed, closed ahead, clearing, etc

XML-SCHEMA:
<xs:simpleType name="Test-Conditions" >
      <xs:annotation>
         <xs:documentation>       
            the ITIS codes for various conditions for the lane
            such as: blocked,  closed,  closed ahead,  clearing,  etc
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="ITIScodes">
         <xs:minInclusive value="768"/>
         <xs:maxInclusive value="1023"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
An ITIS test case from 1512 dot one,  the ITIS code for various lane types.  
Note that this enum and the size range are not vaild ASN.  I am not sure how a union of this type is encoded, need to ask Paul Thorpe.  We will have this type thing when there is a need to append to the ITIS list.  How do we best encode it?

VALID-VALUE-RULE:
{
   myOwn  (123), -- test case
   jugHandle (124), -- another case
   ...
   } (7936..8191)  
-- the ITIS code for various lane types 
-- such as: HOV, left, right, all, ramp, bridge, etc.

XML-SCHEMA:
<xsd:simpleType name="Test-LaneType" />

REMARKS:
This is purposefully flawed test case to confirm that run away files are delt with.


DEFINITION:
A test of the user defined types appeared in external (stand alone) type defs.

XML-SCHEMA:
<xs:simpleType name="Test-UserType1" >
      <xs:annotation>
         <xs:documentation>       
Albert's comment
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="Albert">
         <xs:minInclusive value="123"/>
         <xs:maxInclusive value="456"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
A test of the user defined types appeared in external (stand alone) type defs, this time with format a bit ill formed (as TCIP tends to use)

VALID-VALUE-RULE:
-- the comment for the use of this type def

XML-SCHEMA:
<xs:simpleType name="Test-UserType2" >
      <xs:annotation>
         <xs:documentation>       
            the comment for the use of this type def
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="USHORT"/>
</xs:simpleType>


DEFINITION:
A test of the user defined types appeared in external (stand alone) type defs.  Try three

XML-SCHEMA:
<xs:simpleType name="Test-UserType3" >
      <xs:annotation>
         <xs:documentation>       
            the local date
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="DateAndTime"/>
</xs:simpleType>


DEFINITION:
A complex structure to test the nested extraction routines and related things.  Only one level of stuff, and all pre-defined type defs.

MESSAGE-BODY:
SEQUENCE {
     directoryEntry-Name           DirectoryEntry-Name,  -- here is a comment
     originAirport                 Flight-OriginAirport      OPTIONAL,
                                   -- optional when the origin is known, such
                                   -- as an all departing flight sign board
     destinationAirport            Flight-DestinationAirport OPTIONAL,
     departTimeScheduled           PI-DepartTimeScheduled,
     arriveTimeScheduled           PI-ArriveTimeScheduled,
     offSchedule                   PI-OffSchedule            OPTIONAL,
     departureGate                 Flight-DepartureGate      OPTIONAL,
     arrivalGate                   Flight-ArrivalGate        OPTIONAL
-- perhaps should add a general status lines (delayed, cancelled etc)
-- baggage claim and concourse should also be added
}
-- This comment, being outside the list of elements
-- we presume it relates to the entire ASN entry.

XML-SCHEMA:
<xs:complexType name="Test-SEQ-1" >
      <xs:annotation>
         <xs:documentation>       
            This comment,  being outside the list of elements
            we presume it relates to the entire ASN entry.
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="directoryEntry-Name" type="DirectoryEntry-Name" />
         <xs:element name="originAirport" type="Flight-OriginAirport"  minOccurs="0"/>
         <!-- optional when the origin is known,  such
         as an all departing flight sign board -->
         <xs:element name="destinationAirport" type="Flight-DestinationAirport"  minOccurs="0"/>
         <xs:element name="departTimeScheduled" type="PI-DepartTimeScheduled" />
         <xs:element name="arriveTimeScheduled" type="PI-ArriveTimeScheduled" />
         <xs:element name="offSchedule" type="PI-OffSchedule"  minOccurs="0"/>
         <xs:element name="departureGate" type="Flight-DepartureGate"  minOccurs="0"/>
         <xs:element name="arrivalGate" type="Flight-ArrivalGate"  minOccurs="0"/>
         <!-- perhaps should add a general status lines  (delayed,  cancelled etc)
         baggage claim and concourse should also be added -->
      </xs:sequence>
</xs:complexType>

REMARKS:
Takn in part from From J2354, Section 5.6 Traveler Information Messages


MESSAGE-BODY:
SEQUENCE {
     type      DirectoryEntry-Type,
     subType   DirectoryEntry-SubType
}

XML-SCHEMA:
<xs:complexType name="DirectoryTypePair" >
      <xs:sequence>
         <xs:element name="type" type="DirectoryEntry-Type" />
         <xs:element name="subType" type="DirectoryEntry-SubType" />
      </xs:sequence>
</xs:complexType>


DEFINITION:
As per the published standard.  In addition, the timeoffset element can be used to convey the local time zone.  This is required when merging data sources over multiple time zones.

MESSAGE-BODY:
SEQUENCE {
     date    ATIS-Date,
     time    ATIS-Time, -- time in HHMMSS form
     offset  ATIS-TimeOffset OPTIONAL
}

XML-SCHEMA:
<xs:complexType name="DateTimePair" >
      <xs:sequence>
         <xs:element name="date" type="ATIS-Date" />
         <xs:element name="time" type="ATIS-Time" />
         <xs:element name="offset" type="ATIS-TimeOffset"  minOccurs="0"/>
      </xs:sequence>
</xs:complexType>


MESSAGE-BODY:
CHOICE {
     -- this is a leading comment line
     email               Traveler-Email,
     phone               PhoneInformation,
                         -- made up of country code, phone#, and ext
     pager               Traveler-Pager,
     fax                 Traveler-Fax,
                         -- above two elements presume no country code or
                         -- that code is the same as found in phone info
     device-Identity     Device-Identity
}

XML-SCHEMA:
<xs:complexType name="Test-ContactInformation" >
      <xs:choice>
         <xs:element name="email" type="Traveler-Email" />
         <xs:element name="phone" type="PhoneInformation" />
         <xs:element name="pager" type="Traveler-Pager" />
         <xs:element name="fax" type="Traveler-Fax" />
         <!-- above two elements presume no country code or
         that code is the same as found in phone info -->
         <xs:element name="device-Identity" type="Device-Identity" />
      </xs:choice>
</xs:complexType>


DEFINITION:
Really this is a type def to see if the resulting XML will be formed down to one single line, meaning that the cleanup routines that deal with dangling </end> tags are working well.  Many examples of data re-use in ITS today consist of another element defined the same "base element" over again and these item should be "one liners" in XML.  Also, in sequences one often finds similar usage.  In both cases, a single line is much neater to read.  Note also the use of the model / name space in the definition.

XML-SCHEMA:
<xs:simpleType name="AnewOne" >
      <xs:restriction base ="atis:MyTypeHere"/>
</xs:simpleType>


XML-SCHEMA:


DEFINITION:
Another test of an ITIS range extraction match, grabs only a portion of the roadway conditions portions.

VALID-VALUE-RULE:
(790..1000)   
-- the ITIS codes for various conditions for the lane
-- such as: blocked, closed, closed ahead, 
-- only a partial grab (has bad range values)

XML-SCHEMA:
<xs:simpleType name="Conditions2" >
      <xs:annotation>
         <xs:documentation>       
            the ITIS codes for various conditions for the lane
            such as: blocked,  closed,  closed ahead,
            only a partial grab  (has bad range values)
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base ="ITIScodes">
         <xs:minInclusive value="790"/>
         <xs:maxInclusive value="1000"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword   The set of examples starts simple and build in the examples that follow.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThing    SEQUENCE OF Stuff,
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a1" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThing" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="myThing-item" type="Stuff" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
IOD test case with text (rather then numbers) in the defining part.

VALID-VALUE-RULE:
{iso standard 2345 modules(0) basic-types(1)}

XML-SCHEMA:
<xs:simpleType name="Test-DayPlanActionNumberOID" >
      <xs:restriction base="xs:string"/>
</xs:simpleType>


DEFINITION:
OID test case. Observe that the content of the OID (the expression in the brackets) is not put in as this is "content" and the rules are only converting "structure" - need to look at this as special case and perhaps make a change.

VALID-VALUE-RULE:
{1.23.34.56.67.89}
-- any coments would be treated like this

XML-SCHEMA:
<xs:simpleType name="Test-CPT-CodeTypeName" >
      <xs:annotation>
         <xs:documentation>       
            any coments would be treated like this
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string"/>
</xs:simpleType>


DEFINITION:
A distance marker reference to a location on a roadway.

FORMULA:
V1.5 - New data element proposed by ERM (Event Report Message).

XML-SCHEMA:
<xs:simpleType name="Test-Link-location-linear-reference" >
   <xs:restriction base="xs:float">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="2"/>
   </xs:restriction>
</xs:simpleType>


DEFINITION:
Used as part of Sending a Price Schedule - The first payment where it differs from succeeding payments or the fixed price of a stay.

SOURCE-STD:
Lot, Price, Days, Business Hours, Price Schedule

XML-SCHEMA:
<xs:simpleType name="Test-price-FirstPayment" >
   <xs:restriction base="xs:float">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="99999"/>
   </xs:restriction>
</xs:simpleType>


DEFINITION:
An alphanumeric expression of an identifier of a particular Location/Authority Table or Registry.  Range perverted to be a test case.   Note new naming format (is this 14817?)

XML-SCHEMA:
<xs:simpleType name="Test-PreCoded-RegistryAlphaNumericId" >
      <xs:restriction base="xs:string">
         <xs:minLength value="123"/>
         <xs:maxLength value="456"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
An alphanumeric, UTF-8 character string of up to 64 characters representing a Location Code or other Location Identifier.

XML-SCHEMA:
<xs:simpleType name="Test-PreCoded-AlphaNumId" >
      <xs:restriction base="xs:string">
         <xs:minLength value="0"/>
         <xs:maxLength value="64"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
The value of an attribute as defined in an attribute record.  Values can be varying length strings, up to 255 bytes.

XML-SCHEMA:
<xs:simpleType name="Test-GeomAttribute-AttributeValue" >
      <xs:restriction base="xs:string">
         <xs:minLength value="0"/>
         <xs:maxLength value="255"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Alphanumeric identifier of the ending point of a link or chain.  Nodes may designate the following conditions: intramodal decision points (e.g. intersections), or intermodal network connections (e.g. Park-and-Ride). Nodes are shared by chains. Identifiers may be unique, or non-unique within a hierarchical numbering scheme, or derived from some measure of location such as geographic coordinates.

XML-SCHEMA:
<xs:simpleType name="Test-EndNodeIdAlpha" >
      <xs:restriction base="xs:string">
         <xs:minLength value="0"/>
         <xs:maxLength value="64"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Alphanumeric identifier of the start point of a link or chain.  Nodes may designate the following conditions: intramodal decision points (e.g. intersections), or intermodal network connections (e.g. Park-and-Ride). Nodes are shared by chains. Identifiers may be unique, or non-unique within a hierarchical numbering scheme, or derived from some measure of location such as geographic coordinates.

XML-SCHEMA:
<xs:simpleType name="Test-StartNodeIdAlpha" >
      <xs:restriction base="xs:string">
         <xs:minLength value="0"/>
         <xs:maxLength value="64"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
Alphanumeric identifier of a polygon enclosing an area feature, for example an area of hazardous material spill impact. The polygon ID may be different from the ID of the enclosed area feature.

XML-SCHEMA:
<xs:simpleType name="Test-PolygonIdAlpha" >
      <xs:restriction base="xs:string">
         <xs:minLength value="0"/>
         <xs:maxLength value="64"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
A complex structure to test the nested extraction routines and related things.  This nests and brings some in-line defs to the party to cope with. [Yes these are ugly and yes we tend to avoid this style now, but others in ITS still use it"

MESSAGE-BODY:
SEQUENCE {
     directoryEntry-Name           DirectoryEntry-Name,
     originAirport                 Flight-OriginAirport      OPTIONAL,
                                   -- optional when the origin is known, such
                                   -- as an all departing flight sign board
     destinationAirport            Flight-DestinationAirport OPTIONAL,
     departTimeScheduled           PI-DepartTimeScheduled,
     arriveTimeScheduled           PI-ArriveTimeScheduled,
     nastyInlineInt                INTEGER (12..34)          OPTIONAL,
     offSchedule                   PI-OffSchedule            OPTIONAL,
     nastyNestedThing              SEQUENCE {
               item1   MyDog (woof..bark),
               item2   BIT STRING (SIZE(4)),
     	       inLineEnum          ENUMERATED { 
                                      yes (1),   
                                      no (2),   
                                      huh (3),
                                      yourYakIsGone (4), ...
                                      },
               ...
               -- here is an odd place for a comment
               },
     inLineEnum2      ENUMERATED { yes (1),  no (2),  huh (3) },
     departureGate                 Flight-DepartureGate      OPTIONAL,
     arrivalGate                   Flight-ArrivalGate        OPTIONAL
-- perhaps should add a general status lines (delayed, cancelled etc)
-- baggage claim and concourse should also be added
}
-- this comment, being outside the list of elements
-- relates to the entire peice of ASN

XML-SCHEMA:
<xs:complexType name="Test-SEQ-2" >
      <xs:annotation>
         <xs:documentation>       
            this comment,  being outside the list of elements
            relates to the entire peice of ASN
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="directoryEntry-Name" type="DirectoryEntry-Name" />
         <xs:element name="originAirport" type="Flight-OriginAirport"  minOccurs="0"/>
         <!-- optional when the origin is known,  such
         as an all departing flight sign board -->
         <xs:element name="destinationAirport" type="Flight-DestinationAirport"  minOccurs="0"/>
         <xs:element name="departTimeScheduled" type="PI-DepartTimeScheduled" />
         <xs:element name="arriveTimeScheduled" type="PI-ArriveTimeScheduled" />
         <xs:element name="nastyInlineInt"  minOccurs="0">
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="12"/>
                  <xs:maxInclusive value="34"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
         <xs:element name="offSchedule" type="PI-OffSchedule"  minOccurs="0"/>
         <xs:element name="nastyNestedThing" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="item1" >
                     <xs:simpleType> 
                        <xs:restriction base ="MyDog">
                           <xs:minInclusive value="-1234567"/>
                           <xs:maxInclusive value="-1234567"/>
                        </xs:restriction>
                     </xs:simpleType> 
                  </xs:element>
                  <xs:element name="item2" >
                     <xs:simpleType> 
                        <xs:restriction base="binary">
                           <xs:length value="4"/>
                        </xs:restriction>
                     </xs:simpleType> 
                  </xs:element>
                  <xs:element name="inLineEnum" >
                     <xs:simpleType>
                        <xs:union>
                           <xs:simpleType>
                              <xs:restriction base="xs:unsignedInt">
                                 <xs:minInclusive value="1"/>
                                 <xs:maxInclusive value="4"/>
                              </xs:restriction>
                           </xs:simpleType>
                           <xs:simpleType>
                              <xs:restriction base="xs:string">
                                 <xs:enumeration value="yes"/>
                                 <xs:enumeration value="no"/>
                                 <xs:enumeration value="huh"/>
                                 <xs:enumeration value="yourYakIsGone"/>
                              </xs:restriction>
                           </xs:simpleType >
                        </xs:union>
                     </xs:simpleType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="inLineEnum2" >
            <xs:simpleType>
               <xs:union>
                  <xs:simpleType>
                     <xs:restriction base="xs:unsignedInt">
                        <xs:minInclusive value="1"/>
                        <xs:maxInclusive value="3"/>
                     </xs:restriction>
                  </xs:simpleType>
                  <xs:simpleType>
                     <xs:restriction base="xs:string">
                        <xs:enumeration value="yes"/>
                        <xs:enumeration value="no"/>
                        <xs:enumeration value="huh"/>
                     </xs:restriction>
                  </xs:simpleType >
               </xs:union>
            </xs:simpleType>
         </xs:element>
         <xs:element name="departureGate" type="Flight-DepartureGate"  minOccurs="0"/>
         <xs:element name="arrivalGate" type="Flight-ArrivalGate"  minOccurs="0"/>
         <!-- perhaps should add a general status lines  (delayed,  cancelled etc)
         baggage claim and concourse should also be added -->
      </xs:sequence>
</xs:complexType>

REMARKS:
From J2354, Section 5.6 Traveler Information Messages


DEFINITION:
A simple enum which will be used to test use use cases

VALID-VALUE-RULE:
{
   one    (1),
   two    (2),
   three  (3),
   ...  -- # LOCAL_CONTENT
   }
   -- this is the bit string varient of the local expand case

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_3-item" >
      <xs:annotation>
         <xs:appinfo>
            one (1)
            two (2)
            three (3)
         </xs:appinfo>
         <xs:documentation>       
            this is the bit string varient of the local expand case
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:int">
               <xs:minInclusive value="1"/>
               <xs:maxInclusive value="3"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum_3" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>
<xs:simpleType name="SimpleEnum_3">
   <xs:list itemType="SimpleEnum_3-item"/>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test use use cases.  No item case.

VALID-VALUE-RULE:
(SIZE(10)) 
-- a 10 bit long bin string 
-- not expandable to have local named bits 
-- with the current formats when speced this way

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_3a" >
      <xs:annotation>
         <xs:documentation>       
            a 10 bit long bin string
            not expandable to have local named bits
            with the current formats when speced this way
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="binary">
         <xs:length value="10"/>
      </xs:restriction>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test use use cases.  Case three, note that the SIZE is ignored in this translation becaus ethe result is in fact a union of strings and ints (not binary).

VALID-VALUE-RULE:
{
   one  (1),
   two  (2),
   ... -- # LOCAL_CONTENT   
   } (SIZE(10))
   -- this is the bit string varient of the local expand case

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_3b-item" >
      <xs:annotation>
         <xs:appinfo>
            one (1)
            two (2)
         </xs:appinfo>
         <xs:documentation>       
            this is the bit string varient of the local expand case
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:int">
               <xs:minInclusive value="1"/>
               <xs:maxInclusive value="2"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum_3b" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>
<xs:simpleType name="SimpleEnum_3b">
   <xs:list itemType="SimpleEnum_3b-item"/>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test run-on format use cases. Testing run on content formatting case.

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_4" >
      <xs:annotation>
         <xs:appinfo>
            one (10)
            two (20)
            three (30)
         </xs:appinfo>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="10"/>
               <xs:maxInclusive value="30"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum_4" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test use use cases.  Found inside another struce, case one.

MESSAGE-BODY:
SEQUENCE {
   cat    INTEGER,
   dog    INTEGER,
   test   ENUMERATED {
      one    (10), -- comment one
      two    (20), 
      three  (30), 
      ... -- # LOCAL_CONTENT
      }
   frog   INTEGER,
   ...
   }

XML-SCHEMA:
<xs:complexType name="SimpleEnum-inside" >
      <xs:sequence>
         <xs:element name="cat" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="test" >
            <xs:simpleType>
               <xs:union>
                  <xs:simpleType>
                     <xs:restriction base="xs:unsignedInt">
                        <xs:minInclusive value="10"/>
                        <xs:maxInclusive value="30"/>
                     </xs:restriction>
                  </xs:simpleType>
                  <xs:simpleType>
                     <xs:restriction base="xs:string">
                        <xs:enumeration value="one"/>
                        <xs:enumeration value="two"/>
                        <xs:enumeration value="three"/>
                     </xs:restriction>
                  </xs:simpleType >
                  <xs:simpleType>
                     <xs:restriction base="local:SimpleEnum-insideTest" /> 
                  </xs:simpleType>
               </xs:union>
            </xs:simpleType>
         </xs:element>
         <xs:element name="frog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A simple enum which will be used to test use use cases.  Found inside another struce, case two, multi local content tags.

MESSAGE-BODY:
SEQUENCE {
   cat    INTEGER,
   dog    INTEGER,
   test   ENUMERATED {
      one    (10), -- comment one
      two    (20), 
      three  (30), 
      ... -- # LOCAL_CONTENT
      }
   frog   INTEGER,
   ... -- # LOCAL_CONTENT
   }

XML-SCHEMA:
<xs:complexType name="SimpleEnum-Inside2" >
      <xs:sequence>
         <xs:element name="cat" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="test" >
            <xs:simpleType>
               <xs:union>
                  <xs:simpleType>
                     <xs:restriction base="xs:unsignedInt">
                        <xs:minInclusive value="10"/>
                        <xs:maxInclusive value="30"/>
                     </xs:restriction>
                  </xs:simpleType>
                  <xs:simpleType>
                     <xs:restriction base="xs:string">
                        <xs:enumeration value="one"/>
                        <xs:enumeration value="two"/>
                        <xs:enumeration value="three"/>
                     </xs:restriction>
                  </xs:simpleType >
                  <xs:simpleType>
                     <xs:restriction base="local:SimpleEnum-Inside2Test" /> 
                  </xs:simpleType>
               </xs:union>
            </xs:simpleType>
         </xs:element>
         <xs:element name="frog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="localSimpleEnum-Inside2" type="local:SimpleEnum-Inside2" minOccurs="0"/>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A simple enum which will be used to test use use cases.  Found inside another struce, case three, multi local content tags and deeper nesting. Note how the auto-namming of the local expand points produces a rather poor set of names here ( the second entry with "...3" becomes "...32").

MESSAGE-BODY:
SEQUENCE {
   cat    INTEGER,
   dog    INTEGER,
   innerStruc  SEQUENCE {
      inner1 INTEGER,
      test   ENUMERATED {
         one    (10), -- comment one
         two    (20), 
         three  (30), 
         ... -- # LOCAL_CONTENT
         }
      inner2 INTEGER,
      ... -- # LOCAL_CONTENT
      }, -- End the inner struc
   frog   INTEGER,
   ... -- # LOCAL_CONTENT
   } -- End the outer struc

XML-SCHEMA:
<xs:complexType name="SimpleEnum-Inside3" >
      <xs:annotation>
         <xs:documentation>       
            End the outer struc
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="cat" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="innerStruc" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="inner1" >
                     <xs:simpleType>   
                        <xs:restriction base="xs:int"/>
                     </xs:simpleType>
                  </xs:element>
                  <xs:element name="test" >
                     <xs:simpleType>
                        <xs:union>
                           <xs:simpleType>
                              <xs:restriction base="xs:unsignedInt">
                                 <xs:minInclusive value="10"/>
                                 <xs:maxInclusive value="30"/>
                              </xs:restriction>
                           </xs:simpleType>
                           <xs:simpleType>
                              <xs:restriction base="xs:string">
                                 <xs:enumeration value="one"/>
                                 <xs:enumeration value="two"/>
                                 <xs:enumeration value="three"/>
                              </xs:restriction>
                           </xs:simpleType >
                           <xs:simpleType>
                              <xs:restriction base="local:SimpleEnum-Inside3Test" /> 
                           </xs:simpleType>
                        </xs:union>
                     </xs:simpleType>
                  </xs:element>
                  <xs:element name="inner2" >
                     <xs:simpleType>   
                        <xs:restriction base="xs:int"/>
                     </xs:simpleType>
                  </xs:element>
                  <xs:element name="localSimpleEnum-Inside3" type="local:SimpleEnum-Inside3" minOccurs="0"/>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="frog" >
            <xs:simpleType>   
               <xs:restriction base="xs:int"/>
            </xs:simpleType>
         </xs:element>
         <xs:element name="localSimpleEnum-Inside32" type="local:SimpleEnum-Inside32" minOccurs="0"/>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword   The UNTAGGED keyword is used to remove inner elements.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThing   SEQUENCE OF Stuff, -- # UNTAGGED 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a2" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThing"  type="Stuff" minOccurs="1" maxOccurs="unbounded" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword     Note use of "s" in name of element.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE OF Stuff, 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a3" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="myThing" type="Stuff" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword     Note use of "ies" in name of element.

MESSAGE-BODY:
SEQUENCE {
     cat          NodeOrigin, 
     myVarities   SEQUENCE OF Stuff,
     dog          INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a4" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myVarities" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="myVarity" type="Stuff" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword   Note the extratr (useless) SEQ statement The UNTAGGED keyword is used to remove inner elements.  Note use of "s" in name of element.

THIS ONE HAS AN ERROR FROM THE 2nd SEQ STATEMENT !!!!  Note also the having Stuff all by itself (without a lower case name) is a mixed syntax use issue as well (pre 1997 style to avoid).  replace Stuff with:  myStuff  Stuff  and it will work.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE OF SEQUENCE { Stuff }, -- # UNTAGGED 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a5" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="SEQUENCE" minOccurs="1" maxOccurs="unbounded" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword   The UNTAGGED keyword is used to remove inner elements.  Note use of "s" in name of element.  A bound has been added to the line

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF Stuff, -- # UNTAGGED 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a6" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="Stuff" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword   The UNTAGGED keyword has been removed this time.  Note use of "s" in name of element.  A bound has been added to the line

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF Stuff, 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a7" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="5">
                  <xs:element name="myThing" type="Stuff" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A complex structure to test the nested aspects of the parser and builder routines.

MESSAGE-BODY:
SEQUENCE {
     level1-a     OCTET STRING (SIZE(0..14)),
     level1-b     Thing OPTIONAL,
     level1-c     Thing OPTIONAL,
     level1-d     Thing,
     level1-e     IA5String (SIZE(5..20)),
     level1-f     INTEGER (10..20),
     level1-h     Thing OPTIONAL,
     level1-i     SEQUENCE {
            level2-a   Thing (30..40),
            level2-b   Thing OPTIONAL,
            level2-c   Thing,
            level2-d   SEQUENCE {
                  level3-a   Thing,
                  level3-b   Thing,
                  level3-c   INTEGER (50..60),
                  level3-d   SEQUENCE {
                        level4-a   Thing,
                        level4-b   SEQUENCE OF Thing,
                        level4-c   Thing,
                        level4-d   Thing (70..80),
                        level4-e   Thing -- etc etc etc
                        }
                 }
            },
     level1-j ENUMERATED { yes (1),  no (2) }
}

XML-SCHEMA:
<xs:complexType name="Test-SEQ-4" >
      <xs:sequence>
         <xs:element name="level1-a" >
            <xs:simpleContent>
               <xs:extension base="level1-a-string" >
                  <xs:attribute name="EncodingType" use="required">
                    <xs:simpleType>
                       <xs:restriction base="xs:NMTOKEN">
                          <xs:enumeration value="base64Binary"/>
                       </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
               </xs:extension>
            </xs:simpleContent>
         </xs:element>
         <xs:simpleType name="level1-a-string">
            <xs:restriction base="xs:base64Binary">
               <xs:minLength value="0"/>
               <xs:maxLength value="19"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:element name="level1-b" type="Thing"  minOccurs="0"/>
         <xs:element name="level1-c" type="Thing"  minOccurs="0"/>
         <xs:element name="level1-d" type="Thing" />
         <xs:element name="level1-e" >
            <xs:simpleType>
               <xs:restriction base="xs:string">
                  <xs:minLength value="5"/>
                  <xs:maxLength value="20"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
         <xs:element name="level1-f" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="10"/>
                  <xs:maxInclusive value="20"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
         <xs:element name="level1-h" type="Thing"  minOccurs="0"/>
         <xs:element name="level1-i" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="level2-a" >
                     <xs:simpleType> 
                        <xs:restriction base ="Thing">
                           <xs:minInclusive value="30"/>
                           <xs:maxInclusive value="40"/>
                        </xs:restriction>
                     </xs:simpleType> 
                  </xs:element>
                  <xs:element name="level2-b" type="Thing"  minOccurs="0"/>
                  <xs:element name="level2-c" type="Thing" />
                  <xs:element name="level2-d" >
                     <xs:complexType>
                        <xs:sequence>
                           <xs:element name="level3-a" type="Thing" />
                           <xs:element name="level3-b" type="Thing" />
                           <xs:element name="level3-c" >
                              <xs:simpleType>
                                 <xs:restriction base="xs:unsignedByte">
                                    <xs:minInclusive value="50"/>
                                    <xs:maxInclusive value="60"/>
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:element>
                           <xs:element name="level3-d" >
                              <xs:complexType>
                                 <xs:sequence>
                                    <xs:element name="level4-a" type="Thing" />
                                    <xs:element name="level4-b" >
                                       <xs:complexType>
                                          <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="level4-b-item" type="Thing" />
                                          </xs:sequence>
                                       </xs:complexType>
                                    </xs:element>
                                    <xs:element name="level4-c" type="Thing" />
                                    <xs:element name="level4-d" >
                                       <xs:simpleType> 
                                          <xs:restriction base ="Thing">
                                             <xs:minInclusive value="70"/>
                                             <xs:maxInclusive value="80"/>
                                          </xs:restriction>
                                       </xs:simpleType> 
                                    </xs:element>
                                    <xs:element name="level4-e" type="Thing" />
                                 </xs:sequence>
                              </xs:complexType>
                           </xs:element>
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="level1-j" >
            <xs:simpleType>
               <xs:union>
                  <xs:simpleType>
                     <xs:restriction base="xs:unsignedInt">
                        <xs:minInclusive value="1"/>
                        <xs:maxInclusive value="2"/>
                     </xs:restriction>
                  </xs:simpleType>
                  <xs:simpleType>
                     <xs:restriction base="xs:string">
                        <xs:enumeration value="yes"/>
                        <xs:enumeration value="no"/>
                     </xs:restriction>
                  </xs:simpleType >
               </xs:union>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A complex structure with one simple nesting in it.

MESSAGE-BODY:
SEQUENCE {
     level-a     Thing,
     level-b     Thing,
     level-c     Thing,
     level-d     SEQUENCE {
         levelTWO-a   Thing, 
         levelTWO-b   Thing
         },
     level-e     Thing
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-5" >
      <xs:sequence>
         <xs:element name="level-a" type="Thing" />
         <xs:element name="level-b" type="Thing" />
         <xs:element name="level-c" type="Thing" />
         <xs:element name="level-d" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="levelTWO-a" type="Thing" />
                  <xs:element name="levelTWO-b" type="Thing" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="level-e" type="Thing" />
      </xs:sequence>
</xs:complexType>


DEFINITION:
A complex structure to test the nested aspects of the parser and builder routines - revised top be simpler at each level.

MESSAGE-BODY:
SEQUENCE {
     level-a     Thing,
     level-b     SEQUENCE {
            level2-c   Thing,
            level2-d   SEQUENCE {
                  level3-e   Thing,
                  level3-f   SEQUENCE {
                        level4-g   Thing,
                        level4-h   Thing
                        }
                 }
            }
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-6" >
      <xs:sequence>
         <xs:element name="level-a" type="Thing" />
         <xs:element name="level-b" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="level2-c" type="Thing" />
                  <xs:element name="level2-d" >
                     <xs:complexType>
                        <xs:sequence>
                           <xs:element name="level3-e" type="Thing" />
                           <xs:element name="level3-f" >
                              <xs:complexType>
                                 <xs:sequence>
                                    <xs:element name="level4-g" type="Thing" />
                                    <xs:element name="level4-h" type="Thing" />
                                 </xs:sequence>
                              </xs:complexType>
                           </xs:element>
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A complex structure with two simple nestings in it.

MESSAGE-BODY:
SEQUENCE {
     level-a     Thing,
     level-b     Thing,
     level-c     Thing,
     level-d     SEQUENCE {
         levelTWO-a   Thing, 
         levelTWO-b   SEQUENCE {
             levelTHREE-a   Thing,
             levelTHREE-b   Thing
             }
         },
     level-e     Thing
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-7" >
      <xs:sequence>
         <xs:element name="level-a" type="Thing" />
         <xs:element name="level-b" type="Thing" />
         <xs:element name="level-c" type="Thing" />
         <xs:element name="level-d" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="levelTWO-a" type="Thing" />
                  <xs:element name="levelTWO-b" >
                     <xs:complexType>
                        <xs:sequence>
                           <xs:element name="levelTHREE-a" type="Thing" />
                           <xs:element name="levelTHREE-b" type="Thing" />
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="level-e" type="Thing" />
      </xs:sequence>
</xs:complexType>


MESSAGE-BODY:
SET {
     name    SEQUENCE {
               first   IA5String(SIZE(1..10)),
               last    IA5String (SIZE(1..10)),
               handle  IA5String    (SIZE(1..10))
               },
     email    Traveler-Email,
     phoneSet SEQUENCE {
               phone   PhoneInformation,
               pager   Traveler-Pager,
               fax     Traveler-Fax,
               ...
               },
     device-Identity     Device-Identity
}

XML-SCHEMA:
<xs:complexType name="ContactInformation" >
      <xs:sequence>
         <xs:element name="name" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="first" >
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:minLength value="1"/>
                           <xs:maxLength value="10"/>
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:element>
                  <xs:element name="last" >
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:minLength value="1"/>
                           <xs:maxLength value="10"/>
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:element>
                  <xs:element name="handle" >
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:minLength value="1"/>
                           <xs:maxLength value="10"/>
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="email" type="Traveler-Email" />
         <xs:element name="phoneSet" >
            <xs:complexType>
               <xs:sequence>
                  <xs:element name="phone" type="PhoneInformation" />
                  <xs:element name="pager" type="Traveler-Pager" />
                  <xs:element name="fax" type="Traveler-Fax" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="device-Identity" type="Device-Identity" />
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF keyword

MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     street-info-list SEQUENCE       OF StreetInfo,
     dog    INTEGER (5..10)
     } -- a comment line

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-1" >
      <xs:annotation>
         <xs:documentation>       
            a comment line
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="street-info-list" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="street-info" type="StreetInfo" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the limit bounded SEQUENCE OF keyword

MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     street-info-list SEQUENCE (SIZE(2..4)) OF StreetInfo,
     dog    INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-2" >
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="street-info-list" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="4">
                  <xs:element name="street-info" type="StreetInfo" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the limit bounded SEQUENCE OF keyword with a primitive type entry inside.

MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     street-info-list SEQUENCE (SIZE(2..4)) OF INTEGER (0.255),
     dog    INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-3" >
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="street-info-list" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="4">
                  <xs:element name="street-info" >
                     <xs:simpleType>   
                        <xs:restriction base="xs:int"/>
                     </xs:simpleType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>

REMARKS:
Note that the above is the one time we do not follow the auto-naming rules of the SAE work.  Those rules would have the inner element tag be "INTEGER-item" )or perhaps "unsigedbyte-item"  depending on how you read the rules) and the procesing rules we have implemented follow (from Clause 4.12 in the std) taking the name from the outer element all the time (thus it is named "street-info-list-item" in this exmaple.).


DEFINITION:
Used to test the processing of SEQUENCE OF SEQUENCE keywords with a primitive single type entry inside.  Note that this is a pretty dumb way to code ASN.1, but it is legal and there are examples of this in the registry.

MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     street-info-list SEQUENCE OF SEQUENCE { cat Thing },
     dog    INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-SEQ-1" >
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="street-info-list" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="street-info" >
                    <xs:complexType>
                       <xs:sequence>
                          <xs:element name="cat" type="Thing" />
                       </xs:sequence>
                    </xs:complexType>
                 </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of SEQUENCE OF SEQUENCE keywords with a primitive multiple list of types inside.  Note that this is almost always better formatted as a defined data frame rather than building such complex items up.

MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     street-info-list SEQUENCE (SIZE(2..4)) OF SEQUENCE {
                  mouse  Thing,
                  cat    Thing(0..25),
                  dog2   INTEGER (0..255)
                  },
     dog    INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-SEQ-2" >
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="street-info-list" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="4">
                  <xs:element name="street-info" >
                     <xs:complexType>
                        <xs:sequence>
                           <xs:element name="mouse" type="Thing" />
                           <xs:element name="cat" >
                              <xs:simpleType> 
                                 <xs:restriction base ="Thing">
                                    <xs:minInclusive value="0"/>
                                    <xs:maxInclusive value="25"/>
                                 </xs:restriction>
                              </xs:simpleType> 
                           </xs:element>
                           <xs:element name="dog2" >
                              <xs:simpleType>
                                 <xs:restriction base="xs:unsignedByte"/>
                              </xs:simpleType>
                           </xs:element>
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>

REMARKS:
Note that the above is the one time we do not follow the auto-naming rules of the SAE work.  Those rules would have the inner element tag be "INTEGER-item" (or perhaps "unsigedbyte-item"  depending on how you read the rules) and the procesing rules we have implemented follow (from Clause 4.12 in the std) taking the name from the outer element all the time (thus it is named "street-info-list-item" in this exmaple.).


DEFINITION:
Simple integer test with no bounds.  In general this is very bad to see in the std, however it is legal so we have the deal with it.

XML-SCHEMA:
<xs:simpleType name="Test-INT" >
      <xs:restriction base="xs:int"/>
</xs:simpleType>


DEFINITION:
Used to test the processing of SEQUENCE OF SEQUENCE keywords when at the top level, with no size keyword.

MESSAGE-BODY:
SEQUENCE (SIZE(2..4)) OF Thing  -- A comment here.

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-SEQ-3" >
      <xs:sequence minOccurs="2" maxOccurs="4">
         <xs:element name="test-SEQ-OF-SEQ-3-item" type="Thing" />
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and multiple single inner elements betwen the brackets.   THE RESULT HAS AN ERROR

The UNTAGGED keyword is used to remove inner elements.  Note use of "s" in name of element.  A bound has been added to the line

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF SEQUENCE { 
       one   Stuff,
       two   Stuff,
       three Stuff,
       }, -- # UNTAGGED 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b2" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="SEQUENCE" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and multiple single inner elements betwen the brackets.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF SEQUENCE { 
       one   Stuff,
       two   Stuff,
       three Stuff,
       }, 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b3" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="5">
                  <xs:element name="myThing" >
                     <xs:complexType>
                        <xs:sequence>
                           <xs:element name="one" type="Stuff" />
                           <xs:element name="two" type="Stuff" />
                           <xs:element name="three" type="Stuff" />
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and a single inner element betwen the brackets.   THIS EXAMPLE FAILS, but in a different way then before (the middle element is missing).   If the untagged keyword was present, this example will fail.  If the 2nd SEQ is removed (it is not needed),  the example will work.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF SEQUENCE { Stuff }, 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b4" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings" >
            <xs:complexType>
               <xs:sequence minOccurs="2" maxOccurs="5">
                  <xs:element name="myThing" >
                     <xs:complexType>
                        <xs:sequence>
                        </xs:sequence>
                     </xs:complexType>
                  </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and a single inner element betwen the brackets.  But this time with a propoer two-part name and type def.

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF SEQUENCE { myStuff Stuff }, -- # UNTAGGED  
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b5" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="SEQUENCE" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and a single inner element betwen the brackets.  But this time with a propoer two-part name and type def.   Addinghte UNTAGGED keyword back in, the result again fails.     
I conclude the SEQ of SEQ pattern is not fully coded for the cases where the UNTAGGED ketyword is present.

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b6" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="SEQUENCE" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


VALID-VALUE-RULE:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE OF SEQUENCE { myStuff Stuff }, 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a5" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="myThing" >
                    <xs:complexType>
                       <xs:sequence>
                          <xs:element name="myStuff" type="Stuff" />
                       </xs:sequence>
                    </xs:complexType>
                 </xs:element>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


DEFINITION:
A simple enum which will be used to test use use cases.  Complex comment case

VALID-VALUE-RULE:
{
   one    (10), -- comment one
   -- comment one cont. line. 
   two    (20), -- comment two
   three  (30), -- comment three
   ... -- # LOCAL_CONTENT
   -- an end comment to be placed with last enum
   }
   -- a final comment to tbe placed outside the enum
   -- and therefore applies to the entire production

XML-SCHEMA:
<xs:simpleType name="SimpleEnum-wComments" >
      <xs:annotation>
         <xs:appinfo>
            one (10) -- comment one
             -- comment one cont. line.
            two (20) -- comment two
            three (30) -- comment three
             -- an end comment to be placed with last enum
         </xs:appinfo>
         <xs:documentation>       
            a final comment to tbe placed outside the enum
            and therefore applies to the entire production
         </xs:documentation>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="0"/>
               <xs:maxInclusive value="30"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum-wComments" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>


DEFINITION:
Used to test the processing of SEQUENCE OF SEQUENCE keywords when at the top level, with a size keyword token.

MESSAGE-BODY:
SEQUENCE OF Thing  -- This represent the same case as the others, but at the top-most level where the parser works a bit differently.

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-SEQ-4" >
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
        <xs:element name="test-SEQ-OF-SEQ-4-item" type="Thing" />
      </xs:sequence>
</xs:complexType>


DEFINITION:
Used to test the processing of the unbounded SEQUENCE OF SEQUENCE keyword  and a single inner element betwen the brackets.   THE RESULT HAS AN ERROR

The UNTAGGED keyword is used to remove inner elements.  Note use of "s" in name of element.  A bound has been added to the line

MESSAGE-BODY:
SEQUENCE {
     cat        NodeOrigin, 
     myThings   SEQUENCE (SIZE(2..5)) OF SEQUENCE { Stuff }, -- # UNTAGGED 
     dog        INTEGER (5..10)
     }

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-b1" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="SEQUENCE" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-a9" >
      <xs:sequence>
         <xs:element name="cat" type="NodeOrigin" />
         <xs:element name="myThings"  type="Stuff" minOccurs="2" maxOccurs="5" />
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


MESSAGE-BODY:
SEQUENCE {
     node-origin       NodeOrigin, 
     node-valence      NodeValence,
     geo-location      GeoLocation,
     streetInfoList SEQUENCE       OF StreetInfo,
     dog    INTEGER (5..10)
     } -- a comment line

XML-SCHEMA:
<xs:complexType name="Test-SEQ-OF-1" >
      <xs:annotation>
         <xs:documentation>       
            a comment line
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="node-origin" type="NodeOrigin" />
         <xs:element name="node-valence" type="NodeValence" />
         <xs:element name="geo-location" type="GeoLocation" />
         <xs:element name="streetInfoList" >
            <xs:complexType>
               <xs:sequence minOccurs="0" maxOccurs="unbounded">
                 <xs:element name="streetInfo" type="StreetInfo" />
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="dog" >
            <xs:simpleType>
               <xs:restriction base="xs:unsignedByte">
                  <xs:minInclusive value="5"/>
                  <xs:maxInclusive value="10"/>
               </xs:restriction>
            </xs:simpleType>
         </xs:element>
      </xs:sequence>
</xs:complexType>


XML-SCHEMA:
<xs:simpleType name="SimpleEnum" >
      <xs:annotation>
         <xs:appinfo>
            one (10)
            two (20)
            three (30)
         </xs:appinfo>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="10"/>
               <xs:maxInclusive value="30"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
      </xs:union>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test use use cases. Mult expand case with oddly placed comment.  Note that appneding this comment to the last item above (item two) is the correct thing to do.

VALID-VALUE-RULE:
{
   one    (10),
   two    (20),
   ... -- # LOCAL_CONTENT
   -- what happens when the expand is not at the end?
   three  (30)
  }

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_2" >
      <xs:annotation>
         <xs:appinfo>
            one (10)
            two (20) -- what happens when the expand is not at the end?
            three (30)
         </xs:appinfo>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="10"/>
               <xs:maxInclusive value="30"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum_2" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>


DEFINITION:
A simple enum which will be used to test use use cases. Mult expand case.  Modify to have multiple expand points (which is not legal in ASN but I have seen it occur in long lists).   Note that the logic works correclty (one or more ... expands results in one and only one new union added).

VALID-VALUE-RULE:
{
   one    (10),
   ... -- # LOCAL_CONTENT
   two    (20),
   ... -- # LOCAL_CONTENT
   three  (30)
   ... -- # LOCAL_CONTENT
  }

XML-SCHEMA:
<xs:simpleType name="SimpleEnum_2a" >
      <xs:annotation>
         <xs:appinfo>
            one (10)
            two (20)
            three (30)
         </xs:appinfo>
      </xs:annotation>
      <xs:union>
         <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
               <xs:minInclusive value="10"/>
               <xs:maxInclusive value="30"/>
            </xs:restriction>
         </xs:simpleType>
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="one"/>
               <xs:enumeration value="two"/>
               <xs:enumeration value="three"/>
            </xs:restriction>
         </xs:simpleType >
         <xs:simpleType>
            <xs:restriction base="local:SimpleEnum_2a" /> 
         </xs:simpleType>
      </xs:union>
</xs:simpleType>


# MiscText

text:
For the purposes of this standard, the following definitions, abbreviations and acronyms apply.  To be supplied….


text:
Testing the ANS.1 to XML Conversion Functions


text:
The terms, abbreviations and acronyms cited below shall be a part of the terms of the other companion volumes of this standard unless specifically cited otherwise.


text:
8. Remaining Clauses to be placed here as needed (8 to TBD)


text:
These DE are all test cases to check the ASN.1 to XML conversion rules.  They were taken from actual entries in the DB but have been bent and broken as needed to provide better test cases.


text:
6.1 Data elements, data frames, and data frame references


text:
In the two tables which follow below definitive advice is given regarding the methods to be used when translating the ASN which is a part of this standard into the tagged formatting found in XML deployments.  This falls into two general areas, the actual tags to be used and the content rules to be used to express the ASN encoding.  For each data element, data frame or message a suitable preferred XML tag and a preferred formatting is given in the tables.  These follow the recommendation of the SAE <SITE NAME HERE> recommended practice for translating ASN into XML for ITS use.  
The proper use and nesting of these tags in messages shall follow the ASN developed in this and the base standard document and the rules for XML use cited in the reference documents.  In case of a conflict the ASN found in this document shall take precedence. The ordering of elements found in data structures expressed in XML shall follow that order specified in the ASN source listing provided in prior clauses.  Notably the “optional” keyword in ASN shall imply that the XML tags and content may also be optional in transmitted messages.  In order to ensure interoperation with others, the rendering of phrases and codes into XML found in 1512 (both the ITIS code and others) must also be agreed upon by implementers.  The provisions and options of SAE J2540 are wider than those that are easily supportable in XML. In order to successfully interoperate with other deployments using XML in this way a number of other issues must also be considered and agreed upon.  These are beyond the scope of this document.


text:
The table which follows provides the XML tags used by data frames and by messages.  Each of these complex structures is in turn made up of other data frames or data elements (each of which also have tags).  The lowest level of this hierarchy are the atomic data elements.  The data element tags and the format used for their content follows in the next table.


text:
The data element XML tags and the format used for their content is provided in the table below.   Note that when used in a data structure or a message that this ASN and tags shall be used (as opposed to the ASN name of the instance of the tag).  The presumption in this formatting is that the order and therefore the context of the tag is fully known by the data structure in which it is used and hence it serves no useful purpose to use the "instance name" of the ASN type appearing in the data frame.  [This also provides a level of ease, re-use, and convenience for those implementers who chose to build receiving message parsers that process each tag in unique ways]


text:
XML Tags and Content Formatting Rules for Data Elements


text:
Any tags required by MSG or DF definitions when an in-line ASN primitive element (INTEGER, IA5Sting, etc.) is defined shall have an XML tag in accordance with the cited rule set recommendations.
The tags determined for the entire family of the 1512 standard do not conflict with each other and can therefore be used together as needed.  This may not always be the case when XML tags of other standard (both inside ITS and elsewhere) are merged together.  In such an event the method of XML namespaces shall be used to preserve the tags of this standard.  The name space of "IM:" shall be used as the precursor to identity tags coming from this family of standards.  It is recommended that any tags from the common ITS data dictionary work should use the precursor "ITS:" to identify themselves.  It is recommended that any tags from the ITE-TMDD data dictionary work should use the precursor "TMDD:" to identify themselves.  It is recommended that any tags from the common SAE-ATIS data dictionary work should use the precursor "ATIS:" to identify themselves.  It is recommended that any tags from the common ITE-TCIP data dictionary work should use the precursor "TCIP:" to identify themselves.  
At this time an XML DTD or Schema is not available to represent the ASN encodings of this standard.


text:
This is internal test document and its contents do not match any actual standard.


text:
Data frames specified in Clause 5 are also composed of message elements defined by other standards bodies. These "foreign" elements are defined in the sections which follow.  These definitions were taken from the then current adopted standards of these organizations.  The referenced standards shall be consulted for further information regarding their proper use.  Unless otherwise noted in each entry, the below ASN.1 and XML definitions shall be taken as the governing definition when used in this standard, even when a more current revision of the standard is adopted by the issuing organization.


# MSGs

MESSAGE-BODY:
SEQUENCE {
     keywords            DirectorySearch-Keywords,
     searchOperator      ATIS-SearchOperator
}

REMARKS:
From J2354, Section 5.3 Directory Services Messages

XML-SCHEMA:
<xsd:complexType name="DirectoryKeywordPair" >
   <xsd:sequence>
      <xsd:element name="keywords" type="DirectorySearch-Keywords" />
      <xsd:element name="searchOperator" type="ATIS-SearchOperator" />
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     traveler-Identity                     Traveler-Identity,
     entry-Location                        RouteOrArea,
     directorySearch-Radius                SearchRadius,
     requestPair                           DirectoryTypePair,
     limitReturns                          DirectorySearch-LimitReturns OPTIONAL,
     directoryEntry-LocationType           DirectoryEntry-LocationType  OPTIONAL
}

XML-SCHEMA:
<xsd:complexType name="DirectoryCoreRequest" >
   <xsd:sequence>
      <xsd:element name="traveler-Identity" type="Traveler-Identity" />
      <xsd:element name="entry-Location" type="RouteOrArea" />
      <xsd:element name="directorySearch-Radius" type="SearchRadius" />
      <xsd:element name="requestPair" type="DirectoryTypePair" />
      <xsd:element name="limitReturns" type="DirectorySearch-LimitReturns"  minOccurs="0"/>
      <xsd:element name="directoryEntry-LocationType" type="DirectoryEntry-LocationType"  minOccurs="0"/>
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     identity            DirectoryEntry-Identity,
     location            LocationReference,
     requestPair         DirectoryTypePair,
     name                DirectoryEntry-Name,
     phone               PhoneInformation OPTIONAL,
     shortDescription    DirectoryEntry-ShortDescription OPTIONAL,
     capabilityCode      DirectoryEntry-CapabilityCode OPTIONAL
}

XML-SCHEMA:
<xsd:complexType name="DirectoryEntry" >
   <xsd:sequence>
      <xsd:element name="identity" type="DirectoryEntry-Identity" />
      <xsd:element name="location" type="LocationReference" />
      <xsd:element name="requestPair" type="DirectoryTypePair" />
      <xsd:element name="name" type="DirectoryEntry-Name" />
      <xsd:element name="phone" type="PhoneInformation"  minOccurs="0"/>
      <xsd:element name="shortDescription" type="DirectoryEntry-ShortDescription"  minOccurs="0"/>
      <xsd:element name="capabilityCode" type="DirectoryEntry-CapabilityCode"  minOccurs="0"/>
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     directoryEntry-Name           DirectoryEntry-Name,
     originAirport                 Flight-OriginAirport      OPTIONAL,
                                   -- optional when the origin is known, such
                                   -- as an all departing flight sign board
     destinationAirport            Flight-DestinationAirport OPTIONAL,
     departTimeScheduled           PI-DepartTimeScheduled,
     arriveTimeScheduled           PI-ArriveTimeScheduled,
     offSchedule                   PI-OffSchedule            OPTIONAL,
     departureGate                 Flight-DepartureGate      OPTIONAL,
     arrivalGate                   Flight-ArrivalGate        OPTIONAL
-- perhaps should add a general status lines (delayed, cancelled etc)
-- baggage claim and concourse should also be added
}

REMARKS:
From J2354, Section 5.6 Traveler Information Messages

XML-SCHEMA:
<xsd:complexType name="AirlineTravelInformation" >
   <xsd:sequence>
      <xsd:element name="directoryEntry-Name" type="DirectoryEntry-Name" />
      <xsd:element name="originAirport" type="Flight-OriginAirport"  minOccurs="0"/>
      <!-- optional when the origin is known,  such
      as an all departing flight sign board -->
      <xsd:element name="destinationAirport" type="Flight-DestinationAirport"  minOccurs="0"/>
      <xsd:element name="departTimeScheduled" type="PI-DepartTimeScheduled" />
      <xsd:element name="arriveTimeScheduled" type="PI-ArriveTimeScheduled" />
      <xsd:element name="offSchedule" type="PI-OffSchedule"  minOccurs="0"/>
      <xsd:element name="departureGate" type="Flight-DepartureGate"  minOccurs="0"/>
      <xsd:element name="arrivalGate" type="Flight-ArrivalGate"  minOccurs="0"/>
      <!-- perhaps should add a general status lines  (delayed,  cancelled etc)
      baggage claim and concourse should also be added -->
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     amenityID        PI-AmenityID     OPTIONAL,
     amenity-Type     Amenity-Type,
     name             PI-AmenityName   OPTIONAL,
     status           PI-AmenityStatus OPTIONAL
}

XML-SCHEMA:
<xsd:complexType name="Amenity" >
   <xsd:sequence>
      <xsd:element name="amenityID" type="PI-AmenityID"  minOccurs="0"/>
      <xsd:element name="amenity-Type" type="Amenity-Type" />
      <xsd:element name="name" type="PI-AmenityName"  minOccurs="0"/>
      <xsd:element name="status" type="PI-AmenityStatus"  minOccurs="0"/>
   </xsd:sequence>
</xsd:complexType>


DEFINITION:
As per the published standard.This message is used in the Ack_msg frame to tell the other device the status of the recently sent message frame. It can also be used to allow or prohibit selected types of messages from being indiscriminately sent.

MESSAGE-BODY:
SEQUENCE  {                        
     code         Message-Type (acknowledge-Data-Msg), 
     wd-cnt       Frame-word-cnt, -- length of this message       
     acknowledge  Ack
     }

REMARKS:
From J2313, Section 7.21 Message Type:Acknowledge Data

XML-SCHEMA:
<xsd:complexType name="Acknowledge-Data" >
   <xsd:sequence>
      <xsd:element name="code" type="Message-Type" />
      <xsd:element name="wd-cnt" type="Frame-word-cnt" />
      <xsd:element name="acknowledge" type="Ack" />
   </xsd:sequence>
</xsd:complexType>


REMARKS:
WARNING: all location reference entries used in this standard and other areas of ITS are undergoing a common harmonization process. Check the data registry for current work and adopted standards.

XML-SCHEMA:
<xsd:complexType name="GridProfile" >
   <xsd:sequence>
      <xsd:element name="id" >
         <xsd:restriction base="xsd:int"/>
      </xsd:element>
      <xsd:element name="dv" type="OctetString" EncodingType="base64Binary" />
   </xsd:sequence>
</xsd:complexType>


XML-SCHEMA:
<xsd:complexType name="GeographicCoordinate" >
   <xsd:sequence>
      <xsd:element name="id" >
         <xsd:restriction base="xsd:int"/>
      </xsd:element>
      <xsd:element name="dv" type="OctetString" EncodingType="base64Binary" />
   </xsd:sequence>
</xsd:complexType>


XML-SCHEMA:
<xsd:complexType name="GeometryProfile" >
   <xsd:sequence>
      <xsd:element name="id" >
         <xsd:restriction base="xsd:int"/>
      </xsd:element>
      <xsd:element name="dv" type="OctetString" EncodingType="base64Binary" />
   </xsd:sequence>
</xsd:complexType>


XML-SCHEMA:
<xsd:complexType name="AddressProfile" >
   <xsd:sequence>
      <xsd:element name="id" >
         <xsd:restriction base="xsd:int"/>
      </xsd:element>
      <xsd:element name="dv" type="OctetString" EncodingType="base64Binary" />
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
CHOICE {
     location       LocationReference,
     dbIdentity     DatabaseIdentity
}

REMARKS:
From J2354, Section 5.1 Global Messages.

XML-SCHEMA:
<xsd:complexType name="IdentityOrLocation" >
   <xsd:choice>
      <xsd:element name="location" type="LocationReference" />
      <xsd:element name="dbIdentity" type="DatabaseIdentity" />
   </xsd:choice>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     dbNumber                 DatabaseNumber,
     databaseName             DatabaseName,
     databaseVersion          DatabaseVersion  OPTIONAL
}

XML-SCHEMA:
<xsd:complexType name="Database" >
   <xsd:sequence>
      <xsd:element name="dbNumber" type="DatabaseNumber" />
      <xsd:element name="databaseName" type="DatabaseName" />
      <xsd:element name="databaseVersion" type="DatabaseVersion"  minOccurs="0"/>
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     identity                 OCTET STRING (SIZE(1..10)),
                              -- length limited in this verision
                              -- can this be made a simple string????
     databaseCode             CHOICE {
                              dbNumber  DatabaseNumber,
                              dbName    Database
     }
}

XML-SCHEMA:
<xsd:complexType name="DatabaseIdentity" >
   <xsd:sequence>
      <xsd:element name="identity" type="OctetString" EncodingType="base64Binary" >
         <xsd:restriction>
            <xsd:minLength value="1"/>
            <xsd:maxLength value="10"/>
         </xsd:restriction>
      </xsd:element>
      <!-- length limited in this verision
      can this be made a simple string???? -->
      <xsd:complexType name="databaseCode" >
         <xsd:choice>
            <xsd:element name="dbNumber" type="DatabaseNumber" />
            <xsd:element name="dbName" type="Database" />
         </xsd:choice>
      </xsd:complexType>
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     trip-OriginLocation           LocationReference,
     trip-DestinationLocation      LocationReference,
     wayPoint                      SEQUENCE OF LocationReference
}

XML-SCHEMA:
<xsd:complexType name="CoreRouteRequest" >
   <xsd:sequence>
      <xsd:element name="trip-OriginLocation" type="LocationReference" />
      <xsd:element name="trip-DestinationLocation" type="LocationReference" />
      <xsd:complexType name="wayPoint" >
         <xsd:sequence minOccurs="0" maxOccurs="unbounded">
            <xsd:element name="wayPoint-item" type="LocationReference" />
         </xsd:sequence>
      </xsd:complexType>
   </xsd:sequence>
</xsd:complexType>


DEFINITION:
As per the published standard.  In addition, the timeoffset element can be used to convey the local time zone.  This is required when merging data sources over multiple time zones.

MESSAGE-BODY:
SEQUENCE {
     date    ATIS-Date,
     time    ATIS-Time,
     offset  ATIS-TimeOffset OPTIONAL
}

REMARKS:
This structure has been changed to add an optional time zone as well.

XML-SCHEMA:
<xsd:complexType name="DateTimePair" >
   <xsd:sequence>
      <xsd:element name="date" type="ATIS-Date" />
      <xsd:element name="time" type="ATIS-Time" />
      <xsd:element name="offset" type="ATIS-TimeOffset"  minOccurs="0"/>
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
CHOICE {
     email               Traveler-Email,
     phone               PhoneInformation,
                         -- made up of country code, phone#, and ext
     pager               Traveler-Pager,
     fax                 Traveler-Fax,
                         -- above two elements presume no country code or
                         -- that code is the same as found in phone info
     device-Identity     Device-Identity
}

REMARKS:
From J2354, Section 5.2 Setting Messages

XML-SCHEMA:
<xsd:complexType name="ContactInformation" >
   <xsd:choice>
      <xsd:element name="email" type="Traveler-Email" />
      <xsd:element name="phone" type="PhoneInformation" />
      <xsd:element name="pager" type="Traveler-Pager" />
      <xsd:element name="fax" type="Traveler-Fax" />
      <!-- above two elements presume no country code or
      that code is the same as found in phone info -->
      <xsd:element name="device-Identity" type="Device-Identity" />
   </xsd:choice>
</xsd:complexType>


DEFINITION:
This element is no longer recommended for use.  As per the published standard.

MESSAGE-BODY:
CHOICE {
    levelCode  LevelCode,    -- a range of -7 to + 7 of fixed levels
    altitude   Altitude      -- an actual value of altitude
}
LevelCode ::= INTEGER (-7..7)
-- Do not use

REMARKS:
This element is no longer recommended for use. From J2354, Section 5.1 Global Messages

XML-SCHEMA:
<xsd:complexType name="Altitude" >
   <xsd:choice>
      <xsd:element name="levelCode" type="LevelCode" />
      <xsd:element name="altitude" type="Altitude" />
   </xsd:choice>
</xsd:complexType>


DEFINITION:
As per the published standard. This element is no longer recommended for use. It has been replaced and renamed the ISPVehicle profile. As per the published standard.

MESSAGE-BODY:
SEQUENCE {id INTEGER, dv OCTET STRING}
-- was defined in last revisionh as:
-- SEQUENCE {
--   onStreetName        IA5String (SIZE(1..255)),
--   fromStreetName      IA5String (SIZE(1..255)),
--   toStreetName        IA5String (SIZE(1..255)),
--   side                ENUMERATED {
--                          right(0),
--                          left(1)
--                       },
--   horizontalDatum     INTEGER {
--                          wgs-84 (0), 
--                          wgs-84egm-96 (1),
--                          nad83 (2), 
--                          nad27 (3),
--                          reservedStandard (7),
--                          ...
--                       },
--   verticalDatum       INTEGER   {
--                               wgs-84(0), 
--                               navd-88(1), 
--                               verticalLevelCode(2),
--                               reservedStandard(7),
--                               ...
--                            },
--   startLongitude      INTEGER   (-180000000..180000000),
--   startLatitude       INTEGER   (-90000000..90000000),
--   endLongitude        INTEGER   (-180000000..180000000),
--   endLatitude         INTEGER   (-90000000..90000000),
--   startAltitude       Altitude,
--   endAltitude         Altitude,
--   distanceOffset1     INTEGER   (-8388607..8388607),
--   distanceOffset2     INTEGER   (-8388607..8388607)
-- }

REMARKS:
This element is no longer recommended for use. From J2354, Section 5.1 Global Messages.  WARNING: all location reference entries used in this standard and other areas of ITS are undergoing a common harmonization process. Check the data registry for current work and adopted standards.

XML-SCHEMA:
<xsd:complexType name="CrossStreetsProfile" >
   <xsd:annotation>
      <xsd:documentation>       
         was defined in last revisionh as:
         SEQUENCE  {
         onStreetName        IA5String  (SIZE (1..255) ) ,
         fromStreetName      IA5String  (SIZE (1..255) ) ,
         toStreetName        IA5String  (SIZE (1..255) ) ,
         side                ENUMERATED  {
         right (0) ,
         left (1)
         } ,
         horizontalDatum     INTEGER  {
         wgs-84  (0) ,
         wgs-84egm-96  (1) ,
         nad83  (2) ,
         nad27  (3) ,
         reservedStandard  (7) ,
         ...
         } ,
         verticalDatum       INTEGER    {
         wgs-84 (0) ,
         navd-88 (1) ,
         verticalLevelCode (2) ,
         reservedStandard (7) ,
         ...
         } ,
         startLongitude      INTEGER    (-180000000..180000000) ,
         startLatitude       INTEGER    (-90000000..90000000) ,
         endLongitude        INTEGER    (-180000000..180000000) ,
         endLatitude         INTEGER    (-90000000..90000000) ,
         startAltitude       Altitude,
         endAltitude         Altitude,
         distanceOffset1     INTEGER    (-8388607..8388607) ,
         distanceOffset2     INTEGER    (-8388607..8388607)
         }
      </xsd:documentation>
   </xsd:annotation>
   <xsd:sequence>
      <xsd:element name="id" >
         <xsd:restriction base="xsd:int"/>
      </xsd:element>
      <xsd:element name="dv" type="OctetString" EncodingType="base64Binary" />
   </xsd:sequence>
</xsd:complexType>


MESSAGE-BODY:
CHOICE {
     plannedRoadwayClosure   
                Event-DescriptionTypePlannedRoadwayClosure,
     typeSpecialEvent            
                Event-DescriptionTypeSpecialEvent
-- redo to allow the proper use of the IT IS codes here
}

XML-SCHEMA:
<xsd:complexType name="EventSubType" >
   <xsd:choice>
      <xsd:element name="plannedRoadwayClosure" type="Event-DescriptionTypePlannedRoadwayClosure" />
      <xsd:element name="typeSpecialEvent" type="Event-DescriptionTypeSpecialEvent" />
   </xsd:choice>
</xsd:complexType>


MESSAGE-BODY:
SEQUENCE {
     directoryEntry-Type      DirectoryEntry-Type,
     directoryEntry-SubType   DirectoryEntry-SubType
}

XML-SCHEMA:
<xsd:complexType name="DirectoryTypePair" >
   <xsd:sequence>
      <xsd:element name="directoryEntry-Type" type="DirectoryEntry-Type" />
      <xsd:element name="directoryEntry-SubType" type="DirectoryEntry-SubType" />
   </xsd:sequence>
</xsd:complexType>


# NonATISElements

Definition:
refer to ITE: Transit Communications Interface Profiles: Standard on Passenger Information (PI) Objects

Data Type:
UNIVERSAL 22 - Character - IA5 String Type

Valid Value Rule:
Valid times using 24 hour notation.  HH=00 through 23; MM=00 through 59; SS=00 through 59; ssss=0000 through 9999.  HH represents hours, MM minutes, SS seconds, and ssss decimal seconds to whatever number of significant digits is required.


Definition:
refer to ITE: Traffic Management Data Dictionary (TMDD), March 26, 1998

Valid Value Rule:
Any phrase or sentence which describes a roadway event. (SIZE(1..255))

Remarks:
Sample:  Vehicular accident on I-95 NB North of  Exit 59B - Howie Rd.


Valid Value Rule:
{longtermConstruction(0), shorttermConstruction(1), maintenenance(2), emergencyMaintenance(3), reservedForStandard(4); reservedForLocalUse(16)}


Valid Value Rule:
{parade(0), sportingEvent(1); demonstration(2), festival(3), concert(4), dignitaryVisit(5), movieFilming(6), reservedForStandard(7), reservedForLocalUse(16)}


Valid Value Rule:
{north(0), east(1), south(2), west(3), reservedForStandard(4), reservedForLocalUse(16)}


Valid Value Rule:
{systemGeneratedPlan(0), modifiedSystemPlan(1), manualInputPlan(2), reservedForStandard(3), reservedForLocalUse(16)}


Valid Value Rule:
Valid times using 24 hour notation.  ddd=000 through 999 hh=00 through 23; mm=00 through 59.  ddd represents days, hh hours, and mm minutes (SIZE(1..9))

Remarks:
Sample: 1 07:30 means 1 day 7 hours and 30 minutes


Valid Value Rule:
{none(0), minor(1), major(2), naturalDisaster(3), reservedForStandard(4), reservedForLocalUse(16)} Values 4-15 are reserved for Standard use, 16-240, in increments of 16, are reserved for Local use.


Valid Value Rule:
{incidentDetected(0), confirmedAndResponding(1), clearedAndRecovering(2), overAndDone(3),  reservedForStandard(4), reservedForLocalUse(16)} Values 4-15 are reserved for Standard use, 16-240, in increments of 16, are reserved for Local use.


Valid Value Rule:
{cycleMotocycle(0); CarOrCarWithTrailer(1), busOrMotorhome(2), singleUnitTruck(3), semiTrailer(4); multiTrailer(5), other(6), reservedForStandard(7), reservedForLocalUse(16)}


Value Domain:
Units: Vehicles per hour.  Sample: 26500


Value Domain:
Units: Current vehicles per kilometer density.   Sample: 869


Valid Value Rule:
{freeFlowConditons(0), stableFlowWithNoticableDeclineInFreeFlowConditions(1), stableFlowWithSignificantIncreaseInDriverDiscomfort(2), highDDensityButStableFlow(3), conditionsNearCapacityLevel(4), forcedOrBreakdownFlow(5)}  Units: ASCII Characters.    Sample: B


Valid Value Rule:
{openGrass(1), openSand(2), concreteBarrierWithVisibilityScreens(3), separateRoadways(4), noSeparation(5), paintedMedianNoAccess(6), paintedMedianLeft-Turns(7), concreteBarrier(8), guardrail(9)}  Units: Numerical code.   Sample: 3


Valid Value Rule:
C=concrete, A=asphalt, G=grooved concrete, S=Steel grid (SIZE(1..255))


Valid Value Rule:
T=truck restrictions, H=special low height restriction, W=vehicle width restriction, C=chains required for snow and ice, S=studded tires prohibited, P=slow speed in effect, N=Noise restriction, W=Trailer Ban for high wind,L=Lane-by-lane, '0'=None (SIZE(1..255))


Valid Value Rule:
A single blank character or numeric characters and any alphabetic modifiers (SIZE(1..255))


Valid Value Rule:
{open(1), restriction(2), closed(3), event(4), noDetermination(0)}


Valid Value Rule:
(SIZE(1..255)) W=Wet,I=Ice, S=Snow, R=Rocks, O=Oil, D=Debris, S2=Salted, R=Broken pavement, P=Power lines down, M=Material spill, H=Chemical  spill, '0'=None


Valid Value Rule:
Business hours of the Parking Lot (SIZE(1..12))


Valid Value Rule:
Unique text identifying the Parking Lot (SIZE(1..6))


Keywords:
Lot, Price, Days, Business Hours, Price Schedule

Valid Value Rule:
Description of the cost information (SIZE(1..15))


Valid Value Rule:
{commercialLot(0), publicLot(1), airportLot(2), airportShortTermLot(3), airportLongTermLot(4), Park&RideLot(5), schoolLot(6), shoppingCenterLot(7), transitLot(8), valet(9), street(10), placeOfBusinessReserved(11)}


Valid Value Rule:
Restrictions affecting vehicles for a given parking lot (SIZE(1..12))


Definition:
refer to ITE: Transit Communications Interface Profiles: Standard on Common Public Transportation Objects


Valid Value Rule:
Unique text identifying the Transit Stop


Valid Value Rule:
Detailed walking directions for the traveler (SIZE(1..128))


# Terms

Definition:
The term Data Structure which appears in the original volume is now more commonly called a Data Frame. The definition, which follows, remains the same.  Any construct (including DEs) used to represent the contents of a Data Dictionary.  From  a computer science perspective, data structures are viewed as logical groupings of DEs, used in this document to describe "messages" or parts of messages.  The data structure are comprised of the data elements of the Data Dictionary.  They don't "represent the contents of a data dictionary" directly -they organize them within a framework where useful systems can be constructed.  (One could say they present the contents of a Data Dictionary in a useful way).

UsedIn:
Hazmat P1512.3 Public Safety P1512.2 Traffic Incident P1512.1


Definition:
International Traveler Information Systems, the term commonly associated with the standard for incident phrases developed by the SAE ATIS Committee in conjunction with ITE TMDD and other standards.  This work contains a wide variety of standard phrases to describe incidents and is expected to be used throughout the ITS industry.  The codes found there can be used for sorting and classifying types of incident events, as well as creating uniform human readable phrases.  In the capacity of classifying incident types, ITIS phrases are recommended for used in many areas.  ITIS phrases can also be freely mixed with text and used to describe many incidents.


Definition:
A common method of exchanging messages made up of tags and values organized in a data structure and typically transported over common Internet formats such as HTTP.  XML has a growing number of supporters due to its ability to be implemented in the types of heterogeneous systems often found in public safety.  It is possible to express and exchange the 1512-2000 message set using this method.  Commentary on the implementation of 1512 using this methodology is provided in a latter clause of this standard


# qwerety

DEFINITION:
Integer with a bad section of ASN.1 in the middle of the keywords,

XML-SCHEMA:
<xsd:simpleType name=”ATIS-CostPreferenceAmount”>
   <xsd:restriction base="xsd:unsignedShort">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="999"/>
   </xsd:restriction>
</xsd:simpleType>


VALID-VALUE-RULE:
(SIZE(8))
-- format as: YYYYMMDD where 
-- YYYY  the year, in common era units
-- MM  the month, range 01 to 12
-- DD the day, range 01 to 31
-- use zero for MM an  DD when not applicable

KEYWORD:
Directory, Search Request, Radius, Search,Proximity

XML-SCHEMA:
<xsd:simpleType name="ATIS-Date">
   <xsd:restriction base="xsd:string">
      <xsd:length value="8"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         format as: YYYYMMDD where
         YYYY  the year, in common era units
         MM  the month, range 01 to 12
         DD the day, range 01 to 31
         use zero for MM an  DD when not applicable
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Bit string with ENUMERATION and a fixed size.  This bit of ASN.1 is now outdated but still apeears inthe dictionary.  Use it as a test case for the "NONE" logic whihc states that is the tag of the XML entry has been set mannuly to be "NONE" then we skip the rendering of the XML (or its automatic updating) and we do not render that content part (regardless of contents) when we build a word document.  More typicaly this test case wil be used for entries that would never be sent as XML.

VALID-VALUE-RULE:
{
     sunday            (0), 
     monday            (1), 
     tuesday           (2), 
     wednesday         (3), 
     thursday          (4), 
     friday            (5), 
     saturday          (6), 
     includeHolidays   (7)
     } (SIZE(8))
-- Do not use


DEFINITION:
simple ENUMERATION with cont range of values

VALID-VALUE-RULE:
{
     crossStreets           (0), 
     geometry               (1), 
     grid                   (2), 
     address                (3), 
     geographicCoordinates  (4),
     linearReference        (5), 
     mdi                    (6),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use
     -- Do not use, revised definitions are available in the LRMS effort

XML-SCHEMA:
<xsd:element name="ATIS-LocationType">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="6"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="crossStreets"/>
               <xsd:enumeration value="geometry"/>
               <xsd:enumeration value="grid"/>
               <xsd:enumeration value="address"/>
               <xsd:enumeration value="geographicCoordinates"/>
               <xsd:enumeration value="linearReference"/>
               <xsd:enumeration value="mdi"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         crossStreets (0)
         geometry (1)
         grid (2)
         address (3)
         geographicCoordinates (4)
         linearReference (5)
         mdi (6)
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
         Do not use, revised definitions are available in the LRMS effort
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
A simple ENUMERATION with cont range of values but also with bad ASN code added to try and much the parser up

VALID-VALUE-RULE:
{
     mustContain        (0), 
     shouldContain      (1),
     shouldNotContain   (2), 
     mustNotContain     (3), ands so on,,,,,
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

KEYWORD:
Directory Entry,Price, Days, Business Hours, Price Schedule

XML-SCHEMA:
<xsd:element name="ATIS-SearchOperator">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="3"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="mustContain"/>
               <xsd:enumeration value="shouldContain"/>
               <xsd:enumeration value="shouldNotContain"/>
               <xsd:enumeration value="mustNotContain"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         mustContain (0)
         shouldContain (1)
         shouldNotContain (2)
         mustNotContain (3)
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
Simple bounded string, with uneven comment indenting to cope with

VALID-VALUE-RULE:
(SIZE(6..11))  --test case
-- Format:  HHMMSSssss 
-- Valid times using 24 hour notation.  
-- HH=00 through 23; MM=00 through 59; 
      -- SS=00 through 59; 00 if NA
-- ssss=0000 through 9999. 
 -- Use SS= 60 for leap seconds
-- HH represents hours, MM minutes, SS seconds, 
-- and ssss decimal seconds to whatever number 
-- of significant digits is required (up to four)

XML-SCHEMA:
<xsd:simpleType name="ATIS-Time">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="6"/>
      <xsd:maxLength value="11"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         test case
         Format:  HHMMSSssss
         Valid times using 24 hour notation.
         HH=00 through 23; MM=00 through 59;
         SS=00 through 59; 00 if NA
         ssss=0000 through 9999.
         Use SS= 60 for leap seconds
         HH represents hours, MM minutes, SS seconds,
         and ssss decimal seconds to whatever number
         of significant digits is required (up to four)
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


VALID-VALUE-RULE:
(SIZE(37)) 
-- wrapper for an RDS TMC broadcast message

XML-SCHEMA:
<xsd:element name="Broadcast-Wrapper" type="binary">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[01]*"/>
      <xsd:length value="37"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         wrapper for an RDS TMC broadcast message
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


VALID-VALUE-RULE:
(SIZE(1..255))
-- use defined by ISP
-- formerly was an unlimited length OCTECT string

XML-SCHEMA:
<xsd:simpleType name="Device-Identity">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="255"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         use defined by ISP
         formerly was an unlimited length OCTECT string
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Simple bounded Integer, very large unsigned values

VALID-VALUE-RULE:
(0..123456789012345)
-- Units of gross bits per second (BPS)

XML-SCHEMA:
<xsd:simpleType name=”Device-TransferSpeed”>
   <xsd:restriction base="xsd:unsignedInt">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="123456789012345"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Units of gross bits per second (BPS)
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


VALID-VALUE-RULE:
(SIZE(1..3))
     -- Valid International Access Country Code

XML-SCHEMA:
<xsd:simpleType name="Traveler-InternationalAccessCode">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0123456789-.]*"/>
      <xsd:minLength value="1"/>
      <xsd:maxLength value="3"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Valid International Access Country Code
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Unbounded string, valid as ASN.1 test case (but any use of this sort of open value has been removed in almost all the ATIS work)

VALID-VALUE-RULE:
-- Any combo of numbers, charecters and dashes
-- when two such values are to be compared, the dash
-- marks shall not be considered

XML-SCHEMA:
<xsd:simpleType name="ConfirmationNumber">
   <xsd:restriction base="xsd:string">
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Any combo of numbers, charecters and dashes
         when two such values are to be compared, the dash
         marks shall not be considered
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


VALID-VALUE-RULE:
(SIZE(1..4194303))
-- revised to be 4 Meg max size from unlimited

XML-SCHEMA:
<xsd:element name="DirectoryEntry-ExtendedInfo">
   <xsd:simpleType base="OctetString">
      <xsd:restriction>
         <xsd:minLength value="1"/>
         <xsd:maxLength value="4194303"/>
      </xsd:restriction>
      <xsd:annotation>
         <xsd:documentation>       
            revised to be 4 Meg max size from unlimited
         </xsd:documentation>
      </xsd:annotation>
   </xsd:simpleType>
</xsd:element>


XML-SCHEMA:
<xsd:element name="DirectoryEntry-ExtendedInfoAvail" type="xsd:boolean">
   <xsd:annotation>
      <xsd:documentation>       
         TRUE | FALSE
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


VALID-VALUE-RULE:
{
     anyTypeValidOnlyOnRequest  (0), 
     text                       (1),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xsd:element name="DirectoryEntry-ExtendedInfoType">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="1"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="anyTypeValidOnlyOnRequest"/>
               <xsd:enumeration value="text"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         anyTypeValidOnlyOnRequest (0)
         text (1)
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
A long ENUMERATION test case, but also one that starts with garbage in the first line in the form of a legal comment

VALID-VALUE-RULE:
{   -- this is a test comment
     adoption                     (0), 
     agriculture                  (1),
     alcoholDrugAbusePrograms     (2),
     animalControl                (3),
     assessor                     (4),
     attorneysAndProsecutors      (5),
     birthRecords                 (6),
     boards                       (7), 
     permitsAndInspections        (8),
     childAbuseReporting          (9), 
     civilService                (10), 
     coastal                     (11),  
     consumerComplaintsServices  (12),
     coroner                     (13), 
     courts                      (14),
     customs                     (15),
     deathRecords                (16),
     motorVehicles               (17),
     disabilityServices          (18),
     disasterPreparedness        (19),
     discrimination              (20),
     employmentServices          (21),
     eneryInformationServices    (22),
     environmentalServices       (23),
     foodStamps                  (24),
     fosterCare                  (25),
     garbageAndTrashServices     (26),
     hazardousMaterials          (27),
     healthServices              (28),
     housingServices             (29),
     immigrationServices         (30),
     jailsPenalServices          (31), 
     laborServices               (32), 
     libraries                   (33), 
     marriageServices            (34),
     medicalServices             (35), 
     medicare                    (36),
     military                    (37),
     nationalGuard               (38),
     neighborhoodWatch           (39),
     osha                        (40),
     parksRecreation             (41),
     passportServices            (42),
     postalOffices               (43), 
     probationParole             (44), 
     publicDefender              (45), 
     publicUtilities             (46), 
     recyclingInformation        (47), 
     schools                     (48),
     seniorCitizensServices      (49),
     smallBusinessAdministration (50),
     socalSecurity               (51),
     streetMaintenance           (52),
     suicidePrevention           (53),
     taxInformation              (54),
     unemploymentInsurance       (55),
     utilityService              (56),
     veteransServices            (57),
     victimWitnessAssistance     (58),
     voterRegistration           (59),
     weightsAndMeasures          (60),
     workersCompensation         (61),
     youthInformationServices    (62),
     zoningInformation           (63),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xsd:element name="DirectoryEntry-GovernmentSubType">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="63"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="adoption"/>
               <xsd:enumeration value="agriculture"/>
               <xsd:enumeration value="alcoholDrugAbusePrograms"/>
               <xsd:enumeration value="animalControl"/>
               <xsd:enumeration value="assessor"/>
               <xsd:enumeration value="attorneysAndProsecutors"/>
               <xsd:enumeration value="birthRecords"/>
               <xsd:enumeration value="boards"/>
               <xsd:enumeration value="permitsAndInspections"/>
               <xsd:enumeration value="childAbuseReporting"/>
               <xsd:enumeration value="civilService"/>
               <xsd:enumeration value="coastal"/>
               <xsd:enumeration value="consumerComplaintsServices"/>
               <xsd:enumeration value="coroner"/>
               <xsd:enumeration value="courts"/>
               <xsd:enumeration value="customs"/>
               <xsd:enumeration value="deathRecords"/>
               <xsd:enumeration value="motorVehicles"/>
               <xsd:enumeration value="disabilityServices"/>
               <xsd:enumeration value="disasterPreparedness"/>
               <xsd:enumeration value="discrimination"/>
               <xsd:enumeration value="employmentServices"/>
               <xsd:enumeration value="eneryInformationServices"/>
               <xsd:enumeration value="environmentalServices"/>
               <xsd:enumeration value="foodStamps"/>
               <xsd:enumeration value="fosterCare"/>
               <xsd:enumeration value="garbageAndTrashServices"/>
               <xsd:enumeration value="hazardousMaterials"/>
               <xsd:enumeration value="healthServices"/>
               <xsd:enumeration value="housingServices"/>
               <xsd:enumeration value="immigrationServices"/>
               <xsd:enumeration value="jailsPenalServices"/>
               <xsd:enumeration value="laborServices"/>
               <xsd:enumeration value="libraries"/>
               <xsd:enumeration value="marriageServices"/>
               <xsd:enumeration value="medicalServices"/>
               <xsd:enumeration value="medicare"/>
               <xsd:enumeration value="military"/>
               <xsd:enumeration value="nationalGuard"/>
               <xsd:enumeration value="neighborhoodWatch"/>
               <xsd:enumeration value="osha"/>
               <xsd:enumeration value="parksRecreation"/>
               <xsd:enumeration value="passportServices"/>
               <xsd:enumeration value="postalOffices"/>
               <xsd:enumeration value="probationParole"/>
               <xsd:enumeration value="publicDefender"/>
               <xsd:enumeration value="publicUtilities"/>
               <xsd:enumeration value="recyclingInformation"/>
               <xsd:enumeration value="schools"/>
               <xsd:enumeration value="seniorCitizensServices"/>
               <xsd:enumeration value="smallBusinessAdministration"/>
               <xsd:enumeration value="socalSecurity"/>
               <xsd:enumeration value="streetMaintenance"/>
               <xsd:enumeration value="suicidePrevention"/>
               <xsd:enumeration value="taxInformation"/>
               <xsd:enumeration value="unemploymentInsurance"/>
               <xsd:enumeration value="utilityService"/>
               <xsd:enumeration value="veteransServices"/>
               <xsd:enumeration value="victimWitnessAssistance"/>
               <xsd:enumeration value="voterRegistration"/>
               <xsd:enumeration value="weightsAndMeasures"/>
               <xsd:enumeration value="workersCompensation"/>
               <xsd:enumeration value="youthInformationServices"/>
               <xsd:enumeration value="zoningInformation"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
          -- this is a test comment
         adoption (0)
         agriculture (1)
         alcoholDrugAbusePrograms (2)
         animalControl (3)
         assessor (4)
         attorneysAndProsecutors (5)
         birthRecords (6)
         boards (7)
         permitsAndInspections (8)
         childAbuseReporting (9)
         civilService (10)
         coastal (11)
         consumerComplaintsServices (12)
         coroner (13)
         courts (14)
         customs (15)
         deathRecords (16)
         motorVehicles (17)
         disabilityServices (18)
         disasterPreparedness (19)
         discrimination (20)
         employmentServices (21)
         eneryInformationServices (22)
         environmentalServices (23)
         foodStamps (24)
         fosterCare (25)
         garbageAndTrashServices (26)
         hazardousMaterials (27)
         healthServices (28)
         housingServices (29)
         immigrationServices (30)
         jailsPenalServices (31)
         laborServices (32)
         libraries (33)
         marriageServices (34)
         medicalServices (35)
         medicare (36)
         military (37)
         nationalGuard (38)
         neighborhoodWatch (39)
         osha (40)
         parksRecreation (41)
         passportServices (42)
         postalOffices (43)
         probationParole (44)
         publicDefender (45)
         publicUtilities (46)
         recyclingInformation (47)
         schools (48)
         seniorCitizensServices (49)
         smallBusinessAdministration (50)
         socalSecurity (51)
         streetMaintenance (52)
         suicidePrevention (53)
         taxInformation (54)
         unemploymentInsurance (55)
         utilityService (56)
         veteransServices (57)
         victimWitnessAssistance (58)
         voterRegistration (59)
         weightsAndMeasures (60)
         workersCompensation (61)
         youthInformationServices (62)
         zoningInformation (63)
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
Simple integer test case, 2 byte length case

XML-SCHEMA:
<xsd:simpleType name=”DirectorySearch-LimitReturns”>
   <xsd:restriction base="xsd:unsignedShort">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="65535"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         max entries to return
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Unbounded OCTECT test case.  This is NOT a Simple test case of another type def being used (if it was the OCTECT would be the keyword LRMS).

VALID-VALUE-RULE:
-- LRMS
-- Location Reference
-- Expands to all vaild LRMS profiles
-- Do not use

VALUE-DOMAIN:
Spatial Data Interoperability Protocol for ITS Project (DRAFT)

XML-SCHEMA:
<xsd:element name="DirectorySearch-Location">
   <xsd:simpleType base="OctetString">
      <xsd:annotation>
         <xsd:documentation>       
            LRMS
         Location Reference
         Expands to all vaild LRMS profiles
         Do not use
         </xsd:documentation>
      </xsd:annotation>
   </xsd:simpleType>
</xsd:element>


DEFINITION:
Simple fixed length string test case with comments

VALID-VALUE-RULE:
(SIZE(3))
-- Three character code for airport
-- as per airline industry stds

XML-SCHEMA:
<xsd:simpleType name="Flight-OriginAirport">
   <xsd:restriction base="xsd:string">
      <xsd:length value="3"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Three character code for airport
         as per airline industry stds
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
ENUMERATION case with embedded complex comment rules to extract and add to app info section

VALID-VALUE-RULE:
{
     noEntry         (0),  
     at-10-OrLess    (1),  -- 10%OrLess
     at-20-OrLess    (2),  -- 20%OrLess   
     at-30-OrLess    (3),  -- 30%OrLess   
     at-40-OrLess    (4),  -- 40%OrLess    
     at-50-OrLess    (5),  -- 50%OrLess
     at-60-OrLess    (6),  -- 60%OrLess
     at-70-OrLess    (7),  -- 70%OrLess
     at-80-OrLess    (8),  -- 80%OrLess
     at-90-OrLess    (9),  -- 90%OrLess
     empty          (10),
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xsd:element name="Lot-Status">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="10"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="noEntry"/>
               <xsd:enumeration value="at-10-OrLess"/>
               <xsd:enumeration value="at-20-OrLess"/>
               <xsd:enumeration value="at-30-OrLess"/>
               <xsd:enumeration value="at-40-OrLess"/>
               <xsd:enumeration value="at-50-OrLess"/>
               <xsd:enumeration value="at-60-OrLess"/>
               <xsd:enumeration value="at-70-OrLess"/>
               <xsd:enumeration value="at-80-OrLess"/>
               <xsd:enumeration value="at-90-OrLess"/>
               <xsd:enumeration value="empty"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         noEntry (0)
         at-10-OrLess (1) -- 10%OrLess
         at-20-OrLess (2) -- 20%OrLess
         at-30-OrLess (3) -- 30%OrLess
         at-40-OrLess (4) -- 40%OrLess
         at-50-OrLess (5) -- 50%OrLess
         at-60-OrLess (6) -- 60%OrLess
         at-70-OrLess (7) -- 70%OrLess
         at-80-OrLess (8) -- 80%OrLess
         at-90-OrLess (9) -- 90%OrLess
         empty (10)
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
Integer test case (from the actual std) where there are enumerations present.  I am not sure this is legal ASN1 (doubt it), and it should be redone as a ENUMERATION to be correct.  What will the translation rules make of it.

XML-SCHEMA:
<xsd:simpleType name=”Link-speed”>
   <xsd:restriction base="xsd:unsignedByte">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="15"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Simple small bit string case, but with both global defines (that should be in-line) and with comments present.  Note how the comments are carried over, but now in the XML (without the context of the global defined) they are out of context and should be dropped by hand editing.

VALID-VALUE-RULE:
(SIZE(2))

     in-and-out-common   Mapping-seg ::= '00'B 
                -- Both IN and OUT links use one common set of data
     only-OUT            Mapping-seg ::= '01'B 
                -- Data which follows applies to OUT bound link only
     only-IN             Mapping-seg ::= '10'B 
                -- Data which follows applies to IN bound link only
     in-and-out-unique   Mapping-seg ::= '11'B 
                -- Both IN and OUT links use unique set of data (2 sets)

XML-SCHEMA:
<xsd:element name="Mapping-seg" type="binary">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[01]*"/>
      <xsd:length value="2"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Both IN and OUT links use one common set of data
         Data which follows applies to OUT bound link only
         Data which follows applies to IN bound link only
         Both IN and OUT links use unique set of data (2 sets)
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


VALID-VALUE-RULE:
(-127..127)  
-- yes the uneven nature is correct

XML-SCHEMA:
<xsd:simpleType name=”The-Delta”>
   <xsd:restriction base="xsd:byte">
      <xsd:minInclusive value="-127"/>
      <xsd:maxInclusive value="127"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         yes the uneven nature is correct
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


XML-SCHEMA:
<xsd:simpleType name=”The-Grid”>
   <xsd:restriction base="xsd:short">
      <xsd:minInclusive value="-32767"/>
      <xsd:maxInclusive value="32767"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Simple integer, range test case.   NOTE: This value range is just too large for visual basic to cope with, it is not a problem for the XML rules, but some special work will be needed in min-edit to handle such a value.  The negative sign of the value range provide a wider test case than the other one.  Rework the logic for this to excat is as a compound string rathe than a number.

XML-SCHEMA:
<xsd:simpleType name=”The-LL”>
   <xsd:restriction base="xsd:unsignedInt">
      <xsd:minInclusive value="-123456789012345"/>
      <xsd:maxInclusive value="123456789012349"/>
   </xsd:restriction>
</xsd:simpleType>


XML-SCHEMA:
<xsd:simpleType name=”DirectoryEntry-LocationType”>
   <xsd:restriction base="xsd:unsignedByte">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="125"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Unbounded OCTECT string, , valid as ASN test case (but any use of this sort of open value has been removed in almost all the ATIS work)

VALID-VALUE-RULE:
(SIZE(0..12))
-- any encoding the data source owner wishes to use

XML-SCHEMA:
<xsd:element name="DatabaseNumber">
   <xsd:simpleType base="OctetString">
      <xsd:restriction>
         <xsd:minLength value="0"/>
         <xsd:maxLength value="12"/>
      </xsd:restriction>
      <xsd:annotation>
         <xsd:documentation>       
            any encoding the data source owner wishes to use
         </xsd:documentation>
      </xsd:annotation>
   </xsd:simpleType>
</xsd:element>


DEFINITION:
A simple ENUMERATION with cont range of values formatted all on a run-on line as per the more recent style that TMDD has used.  Also has a missing range gap (value 11).

XML-SCHEMA:
<xsd:element name="RunOnEnum">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="10"/>
               <xsd:maxInclusive value="14"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="item10"/>
               <xsd:enumeration value="item12"/>
               <xsd:enumeration value="item13"/>
               <xsd:enumeration value="item14"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         item10 (10)
         item12 (12)
         item13 (13)
         item14 (14)
      </xsd:appinfo>
      <xsd:documentation>       
         a run on test case
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


XML-SCHEMA:
<xsd:simpleType name=”Item-byte-cnt”>
   <xsd:restriction base="xsd:short">
      <xsd:minInclusive value="-123"/>
      <xsd:maxInclusive value="+511"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
A large Integer test case.  Note that the comment reflecting binary/hex value have not real place in XML, might be the sort of things we edit out manually.

VALID-VALUE-RULE:
(-90000000..90000000) -- latitude
     -- Valid Encoding rules, a signed 32 bit value
     -- none(0x00) - no latitude value available
     -- range (0xEA8AD600..0x15752A00)  29th  bit = 1 micro degree
     -- invalid (0xFFFFFFFF) latitude solution is not valid

XML-SCHEMA:
<xsd:simpleType name=”Location-lat”>
   <xsd:restriction base="xsd:Int">
      <xsd:minInclusive value="-90000000"/>
      <xsd:maxInclusive value="90000000"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         latitude
         Valid Encoding rules, a signed 32 bit value
         none(0x00) - no latitude value available
         range (0xEA8AD600..0x15752A00)  29th  bit = 1 micro degree
         invalid (0xFFFFFFFF) latitude solution is not valid
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
A simple integer test case for the XML, but the comment conveys some internal encoding rules found in the LRMS work that will be reflect only as comment in the XML.  Seems like a good test case for "buyer beware" syndrome.

VALID-VALUE-RULE:
(0..65535) -- altitude
     -- Valid Encoding rules, an unsigned 16 bit value 
     -- with an offset 0x1000 as zero point
     -- invalid (0xFFFF) altitude solution is not valid or unknown
     -- std defines unknown and invalid as the same here

XML-SCHEMA:
<xsd:simpleType name=”Location-alt”>
   <xsd:restriction base="xsd:unsignedShort">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="65535"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         altitude
         Valid Encoding rules, an unsigned 16 bit value
         with an offset 0x1000 as zero point
         invalid (0xFFFF) altitude solution is not valid or unknown
         std defines unknown and invalid as the same here
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Very large Integer value test case.  This might be better formatted as a bit string of 32 bits

NOTE: This value range is just too large for visual basic to cope with, it is not a problem for the XML rules, but some special work will be needed in min-edit to handle such a value.

VALID-VALUE-RULE:
(0..4294967295)  
     -- beacon identification number (32 bit value)    
     -- set to 0x0 is no beacon data present

XML-SCHEMA:
<xsd:simpleType name=”Beacon-id”>
   <xsd:restriction base="xsd:unsignedInt">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="4294967295"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         beacon identification number (32 bit value)
         set to 0x0 is no beacon data present
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Complex bit string test case, in fact this should resolve to a simple bit string as the ENUMERATION defined are all global in scope and thus will be skipped over in this format.  Note that the binary bit ordering has no place in the XML rules, should we have addressed that?

VALID-VALUE-RULE:
(SIZE(16)) -- message received status bits    

     received-okay            Ack ::= '0001'H -- may not be set if 'garbled' is set  
     garbled                  Ack ::= '0002'H -- may not be set if received okay is set   
     do-not-retry             Ack ::= '0004'H                    
     go-to-voice-mode-now     Ack ::= '0008'H                    
     send-delta-positions     Ack ::= '0010'H                    
     send-private-data-types  Ack ::= '0020'H

XML-SCHEMA:
<xsd:element name="Ack" type="binary">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[01]*"/>
      <xsd:length value="16"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         message received status bits
may not be set if 'garbled' is set
         may not be set if received okay is set
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
Complex out of range bit string ENUMERATION where the defined are global and therefore should not be added to the XML (unless they were reformatted to be inside as it more typical)

VALID-VALUE-RULE:
(SIZE(8))

     holiday   Day-of-week ::= '10000000'B 
     sunday    Day-of-week ::= '01000000'B 
     monday    Day-of-week ::= '00100000'B 
     tuesday   Day-of-week ::= '00010000'B 
     wednesday Day-of-week ::= '00001000'B 
     thursday  Day-of-week ::= '00000100'B 
     friday    Day-of-week ::= '00000010'B 
     saturday  Day-of-week ::= '00000001'B

XML-SCHEMA:
<xsd:element name="Day-of-week" type="binary">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[01]*"/>
      <xsd:length value="8"/>
   </xsd:restriction>
</xsd:element>


DEFINITION:
An ENUMERATION test case.  The comment from this came from a Std that spec-ed things at the bit level and so we have binary data in the comments.  These have no place in XML, perhaps we manually edit such comments?

XML-SCHEMA:
<xsd:element name="Free-Flow-Rate">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="0"/>
               <xsd:maxInclusive value="15"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="unknown"/>
               <xsd:enumeration value="under-20-mph"/>
               <xsd:enumeration value="under-25-mph"/>
               <xsd:enumeration value="under-30-mph"/>
               <xsd:enumeration value="under-35-mph"/>
               <xsd:enumeration value="under-40-mph"/>
               <xsd:enumeration value="under-45-mph"/>
               <xsd:enumeration value="under-50-mph"/>
               <xsd:enumeration value="under-55-mph"/>
               <xsd:enumeration value="under-60-mph"/>
               <xsd:enumeration value="under-65-mph"/>
               <xsd:enumeration value="under-70-mph"/>
               <xsd:enumeration value="under-75-mph"/>
               <xsd:enumeration value="under-80-mph"/>
               <xsd:enumeration value="can-not-be-traversed-by-public"/>
               <xsd:enumeration value="can-not-be-transversed-blocked"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
unknown (0) -- '0000'B
under-20-mph (1) -- '0001'B
under-25-mph (2) -- '0010'B
under-30-mph (3) -- '0011'B
under-35-mph (4) -- '0100'B
under-40-mph (5) -- '0101'B
under-45-mph (6) -- '0110'B
under-50-mph (7) -- '0111'B
under-55-mph (8) -- '1000'B
under-60-mph (9) -- '1001'B
under-65-mph (10) -- '1010'B
under-70-mph (11) -- '1011'B
under-75-mph (12) -- '1100'B
under-80-mph (13) -- '1101'B
can-not-be-traversed-by-public (14) -- '1110'B
can-not-be-transversed-blocked (15) -- '1111'B
      </xsd:appinfo>
   </xsd:annotation>
</xsd:element>


DEFINITION:
Simple bit string, but the default line (also a legal keyword in ASN1) is not handled by the XML rule set.  Does XML allow such a default value to be created in the schema, will need to research this.

XML-SCHEMA:
<xsd:element name="Grid-status" type="binary">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[01]*"/>
      <xsd:length value="4"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
DEFAULT ('0000'B)
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


VALID-VALUE-RULE:
(1..999999)
-- LSB units of 1/10th of a mile

XML-SCHEMA:
<xsd:simpleType name=”Trip-MilesToNextManeuver”>
   <xsd:restriction base="xsd:unsignedInt">
      <xsd:minInclusive value="1"/>
      <xsd:maxInclusive value="999999"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         LSB units of 1/10th of a mile
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Simple short num string test case, fixed length.

VALID-VALUE-RULE:
(SIZE(10))
-- Valid Phone Number
-- Do not use, depreciated

XML-SCHEMA:
<xsd:simpleType name="DirectoryEntry-Phone">
   <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0123456789-.]*"/>
      <xsd:length value="10"/>
   </xsd:restriction>
   <xsd:annotation>
      <xsd:documentation>       
         Valid Phone Number
         Do not use, depreciated
      </xsd:documentation>
   </xsd:annotation>
</xsd:simpleType>


DEFINITION:
Enumerated test case.  Complex formatting, complex comment in line and below as well as global, use of the brackets "{" inside comments.  Broken ranges of enumeration values provide some further processing problems (ideally dealt with by a union but not yet programmed to do so).  In fact a real pain of a test case.  Note also that some of the ASN.1 comment text has special chars to XML and has to be processed and converted to escape sequences.

VALID-VALUE-RULE:
{
     lowestCost               (0), 
     maximumCost              (1), -- test comment here
     minimumCost              (2), 
     highValue                (24), -- test {item} here
     targetCost               (3), 
     lowValue               (-23), -- use a < char here
     targetCost2               (4), 
             -- a comment below it
     targetCost3               (5), -- a comment onthe line
    -- and one below it
     ...
     } 
     -- values to 127 reserved for std use
     -- values 128 to 255 reserved for local use

XML-SCHEMA:
<xsd:element name="ATIS-CostPreference">
   <xsd:simpleType>
      <xsd:union>
         <xsd:simpleType>
            <xsd:restriction base="xsd:unsignedInt">
               <xsd:minInclusive value="-23"/>
               <xsd:maxInclusive value="24"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="lowestCost"/>
               <xsd:enumeration value="maximumCost"/>
               <xsd:enumeration value="minimumCost"/>
               <xsd:enumeration value="highValue"/>
               <xsd:enumeration value="targetCost"/>
               <xsd:enumeration value="lowValue"/>
               <xsd:enumeration value="targetCost2"/>
               <xsd:enumeration value="targetCost3"/>
            </xsd:restriction>
         </xsd:simpleType >
      </xsd:union>
   </xsd:simpleType>
   <xsd:annotation>
      <xsd:appinfo>
         lowestCost (0)
         maximumCost (1) -- test comment here
         minimumCost (2)
         highValue (24) -- test {item} here
         targetCost (3)
         lowValue (-23) -- use a &lt; char here
         targetCost2 (4) -- a comment below it
         targetCost3 (5) -- a comment onthe line
          -- and one below it
      </xsd:appinfo>
      <xsd:documentation>       
         values to 127 reserved for std use
         values 128 to 255 reserved for local use
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
This object specifies the first index-column (if multi indexed tables are pointed to, all indices have to be specified within the OID) within a device- type specific action table that contains the actions (specified in the associated columns within the table) that shall be executed if the time indicated within the dayPlanTable and the timeBaseEventSchedule Table is the current time.


DEFINITION:
The name of a data element that contains a set of codes for local use.

VALID-VALUE-RULE:
-- is there some sort of restriction or 
-- value statement to go here?

XML-SCHEMA:
<xsd:element name="CPT-CodeTypeName" type="xsd:string">
   <xsd:annotation>
      <xsd:documentation>       
         is there some sort of restriction or
         value statement to go here?
      </xsd:documentation>
   </xsd:annotation>
</xsd:element>


DEFINITION:
A distance marker reference to a location on a roadway.

FORMULA:
V1.5 - New data element proposed by ERM (Event Report Message).


DEFINITION:
Used as part of Sending a Price Schedule - The first payment where it differs from succeeding payments or the fixed price of a stay.

SOURCE-STD:
Lot, Price, Days, Business Hours, Price Schedule


DEFINITION:
Used as part of Sending a Price Schedule - The Maximum amount payable regardless of stay.

CLASS-NAME:
Final harmonization.  19990614: Keep 6073 and 6135 separate.


DEFINITION:
Used as part of Sending a Price Schedule - The Cost of a space for the given time interval with all other qualifiers specified.


DEFINITION:
An alphanumeric expression of an identifier of a particular Location/Authority Table or Registry.  Range perverted to be a test case.   Note new naming format (is this 14817?)

XML-SCHEMA:
<xsd:simpleType name="PreCoded-RegistryAlphaNumericId">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="123"/>
      <xsd:maxLength value="456"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
An alphanumeric, UTF-8 character string of up to 64 characters representing a Location Code or other Location Identifier.

XML-SCHEMA:
<xsd:simpleType name="PreCoded-AlphaNumId">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="0"/>
      <xsd:maxLength value="64"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
The value of an attribute as defined in an attribute record.  Values can be varying length strings, up to 255 bytes.

XML-SCHEMA:
<xsd:simpleType name="GeomAttribute-AttributeValue">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="0"/>
      <xsd:maxLength value="255"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Alphanumeric identifier of the ending point of a link or chain.  Nodes may designate the following conditions: intramodal decision points (e.g. intersections), or intermodal network connections (e.g. Park-and-Ride). Nodes are shared by chains. Identifiers may be unique, or non-unique within a hierarchical numbering scheme, or derived from some measure of location such as geographic coordinates.

XML-SCHEMA:
<xsd:simpleType name="EndNodeIdAlpha">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="0"/>
      <xsd:maxLength value="64"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Alphanumeric identifier of the start point of a link or chain.  Nodes may designate the following conditions: intramodal decision points (e.g. intersections), or intermodal network connections (e.g. Park-and-Ride). Nodes are shared by chains. Identifiers may be unique, or non-unique within a hierarchical numbering scheme, or derived from some measure of location such as geographic coordinates.

XML-SCHEMA:
<xsd:simpleType name="StartNodeIdAlpha">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="0"/>
      <xsd:maxLength value="64"/>
   </xsd:restriction>
</xsd:simpleType>


DEFINITION:
Alphanumeric identifier of a polygon enclosing an area feature, for example an area of hazardous material spill impact. The polygon ID may be different from the ID of the enclosed area feature.

XML-SCHEMA:
<xsd:simpleType name="PolygonIdAlpha">
   <xsd:restriction base="xsd:string">
      <xsd:minLength value="0"/>
      <xsd:maxLength value="64"/>
   </xsd:restriction>
</xsd:simpleType>


# ExternalDEs

DEFINITION:
The all purpose Location Reference Message Set (LRMS) message used in all of ITS.

MESSAGE-BODY:
LRMS.LocationReference

-- Which is in turn defined in the LRMS module as 
LocationReference ::= CHOICE
   {
   geometry            GeometryProfile,
   geocoordinate       GeographicCoordinate,
   grid                GridProfile,
   linearReferencing   LinearReferenceProfile,
   crossStreets        CrossStreetsProfile,
   address             AddressProfile,
   mdi                 ModelProfile
   }

REMARKS:
At this time the entire LRMS system is being adopted as an SAE standard. Consult that effort for the most current defintions of the elements which make up this structure.


