Commit f895599b authored by Garcia's avatar Garcia
Browse files

Add new XSD/TTCN-3 files

parent b4778834
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -11,6 +11,13 @@
 */
module AtsNg112_TestCases {
    
    // RFC5985 Held
    import from XSD all;
    import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all
    with {
        extension "File:./RFC5985_held.xsd";
    }
    
    // Libcommon
    import from LibCommon_Time all;
    import from LibCommon_VerdictControl all;
@@ -18,6 +25,7 @@ module AtsNg112_TestCases {
    
    // LibHttp
    import from LibItsHttp_TypesAndValues all;
    import from LibItsHttp_XmlMessageBodyTypes all;
    import from LibItsHttp_Functions all;
    import from LibItsHttp_Templates all;
    import from LibItsHttp_TestSystem all;
@@ -31,6 +39,7 @@ module AtsNg112_TestCases {
    import from LibNg112_Functions all;
    import from LibNg112_TestSystem all;
    import from LibNg112_Pics all;
    import from LibNg112_Pixits all;
    
    testcase TC_1() runs on SipComponent system TestAdapter {
        
@@ -65,12 +74,17 @@ module AtsNg112_TestCases {
        
        // Preamble
        f_init_default_headers_list(v_headers);
        f_remove_headears_list({ c_header_accept}, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_LISP_URI,
                                                        v_headers,
                                                        m_http_message_body_xml(
                                                                                XmlBody: { locationRequest := valueof(m_locationRequest(
                                                                                                                                        m_device({PX_DEVICE_URI}).elem_list, 
                                                                                                                                        m_locationTypeType(m_locationTypeBase_all))) 
                                                                                         }
        ))));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
@@ -80,8 +94,9 @@ module AtsNg112_TestCases {
            [] httpPort.receive(
                                mw_http_response(
                                                 mw_http_response_ok(
                                                                     mw_http_message_body_xml
            ))) {
                                                                     mw_http_message_body_xml(
                                                                                              XmlBody: { locationResponse := mw_locationResponse_dummy }
            )))) {
                tc_ac.stop;
                log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
+8 −0
Original line number Diff line number Diff line
module LibNg112_Pixits {

    /**
     * @desc 
     */
    modulepar charstring PX_DEVICE_URI := "sip:user@example.net;gr=kjh29x97us97d";
    
} // End of module LibNg112_Pixits
+82 −32
Original line number Diff line number Diff line
@@ -6,16 +6,20 @@ module LibNg112_Templates {
  with {
      extension "File:./RFC5985_held.xsd";
  }
  import from urn_ietf_params_xml_ns_geopriv_held_id language "XSD" all
  with {
      extension "RFC6155_held_id.xsd";
  }
  
  // LibNg112
  
  group rfc5985_held {
    
        template (omit) LocationRequestType m_locationRequest(
                                                              template (value) LocationRequestType.elem_list p_elem_list,
                                                              template (omit) ResponseTimeType p_responseTime := omit,
                                                              template (omit) LocationRequestType.attr p_attr := omit,
                                                              template (omit) LocationTypeType p_locationType  := omit
    template (omit) LocationRequest m_locationRequest(
                                                      in template (value) LocationRequestType.elem_list p_elem_list,
                                                      in template (omit) LocationTypeType p_locationType  := omit,
                                                      in template (omit) ResponseTimeType p_responseTime := omit,
                                                      in  template (omit) LocationRequestType.attr p_attr := omit
    ) := {
        responseTime    := p_responseTime,
        attr            := p_attr,
@@ -31,6 +35,52 @@ module LibNg112_Templates {
        elem_list       := p_elem_list
    } // End of template mw_locationResponse_dummy
    
    
    
    
    
    template (omit) LocationTypeType m_locationTypeType(
                                                        in template (value) LocationTypeBase p_base,
                                                        in template (omit) XSD.Boolean p_exact := omit
    ) := {
        exact   := p_exact,
        base    := p_base
    } // End of template m_locationTypeType
    
    template (value) LocationTypeBase m_locationTypeBase_civic := {
        alt_1 := {
            civic
        }
    } // End of template m_locationTypeBase_civic
    
    template (value) LocationTypeBase m_locationTypeBase_geodetic := {
        alt_1 := {
            geodetic
        }
    } // End of template m_locationTypeBase_geodetic
    
    template (value) LocationTypeBase m_locationTypeBase_all := {
        alt_1 := {
            geodetic, civic
        }
    } // End of template m_locationTypeBase_all
    
  } // End of group rfc5985_held
  
  group rfc6155_held_id {
    
    template (value) Device m_device(
                                     in template (value) Device.elem_list p_elem_list
    ) := {
      elem_list := p_elem_list
    } // End of template m_device
    
    template (present) Device mw_device(
                                        template (present) DeviceIdentity.elem_list p_elem_list := ?
    ) := {
      elem_list := p_elem_list
    } // End of template mw_device
    
  } // End of group rfc6155_held_id
  
} // End of module LibNg112_Templates
+87 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf"
xmlns:tns="urn:ietf:params:xml:ns:pidf"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">

<!-- This import brings in the XML language attribute xml:lang-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
           schemaLocation="http://www.w3.org/2001/xml.xsd"/>

<xs:element name="presence" type="tns:presence"/>

<xs:complexType name="presence">
  <xs:sequence>
    <xs:element name="tuple" type="tns:tuple" minOccurs="0"
                maxOccurs="unbounded"/>
    <xs:element name="note" type="tns:note" minOccurs="0"
                maxOccurs="unbounded"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="entity" type="xs:anyURI" use="required"/>
</xs:complexType>

<xs:complexType name="tuple">
  <xs:sequence>
    <xs:element name="status" type="tns:status"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
    <xs:element name="contact" type="tns:contact" minOccurs="0"/>
    <xs:element name="note" type="tns:note" minOccurs="0"
                maxOccurs="unbounded"/>
    <xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>

<xs:complexType name="status">
  <xs:sequence>
    <xs:element name="basic" type="tns:basic" minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:simpleType name="basic">
  <xs:restriction base="xs:string">
    <xs:enumeration value="open"/>
    <xs:enumeration value="closed"/>
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="contact">
  <xs:simpleContent>
    <xs:extension base="xs:anyURI">
      <xs:attribute name="priority" type="tns:qvalue"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

<xs:complexType name="note">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

<xs:simpleType name="qvalue">
  <xs:restriction base="xs:decimal">
    <xs:pattern value="0(.[0-9]{0,3})?"/>
    <xs:pattern value="1(.0{0,3})?"/>
  </xs:restriction>
</xs:simpleType>

<!-- Global Attributes -->
<xs:attribute name="mustUnderstand" type="xs:boolean" default="0">
  <xs:annotation>
    <xs:documentation>
      This attribute may be used on any element within an optional
      PIDF extension to indicate that the corresponding element must
      be understood by the PIDF processor if the enclosing optional
      element is to be handled.
    </xs:documentation>
  </xs:annotation>
</xs:attribute>
</xs:schema>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="urn:ietf:params:xml:ns:pidf:geopriv10"
xmlns:tns="urn:ietf:params:xml:ns:pidf:geopriv10"
xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace=
           "urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy" />
<!-- This import brings in the XML language attribute xml:lang-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
           schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:element name="geopriv" type="tns:geopriv"/>
<xs:complexType name="geopriv">
  <xs:sequence>
    <xs:element name="location-info" type="tns:locInfoType"
                minOccurs="1" maxOccurs="1"/>
    <xs:element name="usage-rules" type="gbp:locPolicyType"
                minOccurs="1" maxOccurs="1"/>
    <xs:element name="method" type="tns:locMethod"
                minOccurs="0" maxOccurs="1"/>
    <xs:element name="provided-by" type="tns:locProvidedBy"
                minOccurs="0" maxOccurs="1"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="locInfoType">
  <xs:sequence>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="locMethod">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute ref="xml:lang" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
<xs:complexType name="locProvidedBy">
  <xs:sequence>
    <xs:any namespace="##other" processContents="skip"
            minOccurs="1" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
</xs:schema>
Loading