Commit 649ab870 authored by garciay's avatar garciay
Browse files

Re-organize Geopriv CivicAddress

parent fda2f7d6
Loading
Loading
Loading
Loading
+95 −0
Original line number Diff line number Diff line
/*******************************************************************************
* Copyright (c) 2000-2018 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/6 R4B                       
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*******************************************************************************/
//
//  File:          UsefulTtcn3Types.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
module UsefulTtcn3Types {


    type integer byte (-128 .. 127) /*with { variant "8 bit" }*/;

    type integer unsignedbyte (0 .. 255) /*with { variant "unsigned 8 bit" }*/;

    type integer short (-32768 .. 32767) /*with { variant "16 bit" }*/;

    type integer unsignedshort (0 .. 65535) /*with { variant "unsigned 16 bit" }*/;

    type integer long (-2147483648 .. 2147483647) /*with { variant "32 bit" }*/;

    type integer unsignedlong (0 .. 4294967295) /*with { variant "unsigned 32 bit" }*/;

    type integer longlong ( -9223372036854775808 .. 9223372036854775807 ) /*with { variant "64 bit" }*/;

    type integer unsignedlonglong ( 0 .. 18446744073709551615 ) /*with { variant "unsigned 64 bit" }*/;

    type float IEEE754float /*with { variant "IEEE754 float" }*/;

    type float IEEE754double /*with { variant "IEEE754 double" }*/;

    type float IEEE754extfloat /*with { variant "IEEE754 extended float" }*/;

    type float IEEE754extdouble /*with { variant "IEEE754 extended double" }*/;

    type universal charstring utf8string /*with { variant "UTF-8" }*/;

    type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) /*with { variant "UCS-2" }*/;

    type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) /*with { variant "UTF-16" }*/;

    type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) /*with { variant "8 bit" }*/;

    type record IDLfixed
    {
    	unsignedshort digits,
    	short scale,
    	charstring value_
    }
    /*with {
    variant "IDL:fixed FORMAL/01-12-01 v.2.6";
    }*/;

    /*
    type charstring char length (1);

    NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal
    charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as
    identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility
    with previous versions of the TTCN-3 standard. (except Titan doesn't)

    NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding
    for its values. Also, other properties of the base type can be changed by using attribute mechanisms.
    */

    type universal charstring uchar length (1);

    /*
    NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given
    encoding for its values. Also, other properties of the base type can be changed by using attribute
    mechanisms.
    */

    type bitstring bit length (1);

    type hexstring hex length (1);

    type octetstring octet length (1);

}
with {
encode "XML";
}
+337 −0
Original line number Diff line number Diff line
/*******************************************************************************
* Copyright (c) 2000-2018 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/6 R4B                       
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*******************************************************************************/
//
//  File:          XSD.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
module XSD {

import from UsefulTtcn3Types all;

//These constants are used in the XSD date/time type definitions
const charstring
  dash := "-",
  cln  := ":",
  year := "[0-9]#4",
  yearExpansion := "(-([1-9][0-9]#(0,))#(,1))#(,1)",
  month := "(0[1-9]|1[0-2])",
  dayOfMonth := "(0[1-9]|[12][0-9]|3[01])",
  hour := "([01][0-9]|2[0-3])",
  minute := "([0-5][0-9])",
  second := "([0-5][0-9])",
  sFraction := "(.[0-9]#(1,))#(,1)",
  endOfDayExt := "24:00:00(.0#(1,))#(,1)",
  nums := "[0-9]#(1,)",
  ZorTimeZoneExt := "(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))#(,1)",
  durTime := "(T[0-9]#(1,)"&
             "(H([0-9]#(1,)(M([0-9]#(1,)(S|.[0-9]#(1,)S))#(,1)|.[0-9]#(1,)S|S))#(,1)|"&
             "M([0-9]#(1,)(S|.[0-9]#(1,)S)|.[0-9]#(1,)M)#(,1)|"&
             "S|"&
             ".[0-9]#(1,)S))"

//anySimpleType

type XMLCompatibleString AnySimpleType
with {
variant "XSD:anySimpleType";
};

//anyType;

type record AnyType
{
	record of String embed_values optional,
	record of String attr optional,
	record of String elem_list
}
with {
variant "XSD:anyType";
variant "embedValues";
variant (attr) "anyAttributes";
variant (elem_list) "anyElement";
};
// String types

type XMLCompatibleString String
with {
variant "XSD:string";
};

type XMLStringWithNoCRLFHT NormalizedString
with {
variant "XSD:normalizedString";
};

type NormalizedString Token
with {
variant "XSD:token";
};

type XMLStringWithNoWhitespace Name
with {
variant "XSD:Name";
};

type XMLStringWithNoWhitespace NMTOKEN
with {
variant "XSD:NMTOKEN";
};

type Name NCName
with {
variant "XSD:NCName";
};

type NCName ID
with {
variant "XSD:ID";
};

type NCName IDREF
with {
variant "XSD:IDREF";
};

type NCName ENTITY
with {
variant "XSD:ENTITY";
};

type octetstring HexBinary
with {
variant "XSD:hexBinary";
};

type octetstring Base64Binary
with {
variant "XSD:base64Binary";
};

type XMLStringWithNoCRLFHT AnyURI
with {
variant "XSD:anyURI";
};

type charstring Language (pattern "[a-zA-Z]#(1,8)(-\w#(1,8))#(0,)")
with {
variant "XSD:language";
};
// Integer types

type integer Integer
with {
variant "XSD:integer";
};

type integer PositiveInteger (1 .. infinity)
with {
variant "XSD:positiveInteger";
};

type integer NonPositiveInteger (-infinity .. 0)
with {
variant "XSD:nonPositiveInteger";
};

type integer NegativeInteger (-infinity .. -1)
with {
variant "XSD:negativeInteger";
};

type integer NonNegativeInteger (0 .. infinity)
with {
variant "XSD:nonNegativeInteger";
};

type longlong Long
with {
variant "XSD:long";
};

type unsignedlonglong UnsignedLong
with {
variant "XSD:unsignedLong";
};

type long Int
with {
variant "XSD:int";
};

type unsignedlong UnsignedInt
with {
variant "XSD:unsignedInt";
};

type short Short
with {
variant "XSD:short";
};

type unsignedshort UnsignedShort
with {
variant "XSD:unsignedShort";
};

type byte Byte
with {
variant "XSD:byte";
};

type unsignedbyte UnsignedByte
with {
variant "XSD:unsignedByte";
};

// Float types

type float Decimal
with {
variant "XSD:decimal";
};

type IEEE754float Float
with {
variant "XSD:float";
};

type IEEE754double Double
with {
variant "XSD:double";
};

// Time types

type charstring Duration (pattern
  "{dash}#(,1)P({nums}(Y({nums}(M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|" &
  "{durTime}#(,1))|M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|{durTime})")
with {
variant "XSD:duration";
};

type charstring DateTime (pattern
  "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}T({hour}{cln}{minute}{cln}{second}" &
 "{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" )
with {
variant "XSD:dateTime";
};

type charstring Time (pattern
  "({hour}{cln}{minute}{cln}{second}{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" )
with {
variant "XSD:time";
};

type charstring Date (pattern
  "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:date";
};

type charstring GYearMonth (pattern
  "{yearExpansion}{year}{dash}{month}{ZorTimeZoneExt}" )
with {
variant "XSD:gYearMonth";
};

type charstring GYear (pattern
  "{yearExpansion}{year}{ZorTimeZoneExt}" )
with {
variant "XSD:gYear";
};

type charstring GMonthDay (pattern
 "{dash}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:gMonthDay";
};

type charstring GDay (pattern
  "{dash}{dash}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:gDay";
};

type charstring GMonth (pattern
  "{dash}{dash}{month}{ZorTimeZoneExt}" )
with {
variant "XSD:gMonth";
};

// Sequence types

type record of NMTOKEN NMTOKENS
with {
variant "XSD:NMTOKENS";
};

type record of IDREF IDREFS
with {
variant "XSD:IDREFS";
};

type record of ENTITY ENTITIES
with {
variant "XSD:ENTITIES";
};

type record QName
{
	AnyURI uri  optional,
	NCName name
}
with {
variant "XSD:QName";
};

// Boolean type

type boolean Boolean
with {
variant "XSD:boolean";
};

//TTCN-3 type definitions supporting the mapping of W3C XML Schema built-in datatypes

type utf8string XMLCompatibleString
(
	char(0,0,0,9)..char(0,0,0,9),
	char(0,0,0,10)..char(0,0,0,10),
	char(0,0,0,13)..char(0,0,0,13),
  	char(0,0,0,32)..char(0,0,215,255),
  	char(0,0,224,0)..char(0,0,255,253),
  	char(0,1,0,0)..char(0,16,255,253)
)

type utf8string XMLStringWithNoWhitespace
(
	char(0,0,0,33)..char(0,0,215,255),
  	char(0,0,224,0)..char(0,0,255,253),
  	char(0,1,0,0)..char(0,16,255,253)
)

type utf8string XMLStringWithNoCRLFHT
(
	char(0,0,0,32)..char(0,0,215,255),
 	char(0,0,224,0)..char(0,0,255,253),
  	char(0,1,0,0)..char(0,16,255,253)
)

}
with{
encode "XML"
}
+1221 −0

File added.

Preview size limit exceeded, changes collapsed.

+204 −0
Original line number Diff line number Diff line
/*******************************************************************************
* Copyright (c) 2000-2018 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/6 R4B                       
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*******************************************************************************/
//
//  File:          http_www_w3_org_XML_1998_namespace.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Tue Aug  7 08:06:30 2018
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- xml_2001.xsd
//			/* xml version = "1.0" */
//			/* targetnamespace = "http://www.w3.org/XML/1998/namespace" */
//	- xml.xsd
//			/* xml version = "1.0" */
//			/* targetnamespace = "http://www.w3.org/XML/1998/namespace" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module http_www_w3_org_XML_1998_namespace {


import from XSD all;


/* See http://www.w3.org/XML/1998/namespace.html and
   http://www.w3.org/TR/REC-xml for information about this namespace.

    This schema document describes the XML namespace, in a form
    suitable for import by other schema documents.  

    Note that local names in this namespace are intended to be defined
    only by the World Wide Web Consortium or its subgroups.  The
    following names are currently defined in this namespace and should
    not be used with conflicting semantics by any Working Group,
    specification, or document instance:

    base (as an attribute name): denotes an attribute whose value
         provides a URI to be used as the base for interpreting any
         relative URIs in the scope of the element on which it
         appears; its value is inherited.  This name is reserved
         by virtue of its definition in the XML Base specification.

    lang (as an attribute name): denotes an attribute whose value
         is a language code for the natural language of the content of
         any element; its value is inherited.  This name is reserved
         by virtue of its definition in the XML specification.
  
    space (as an attribute name): denotes an attribute whose
         value is a keyword indicating what whitespace processing
         discipline is intended for the content of the element; its
         value is inherited.  This name is reserved by virtue of its
         definition in the XML specification.

    Father (in any context at all): denotes Jon Bosak, the chair of 
         the original XML Working Group.  This name is reserved by 
         the following decision of the W3C XML Plenary and 
         XML Coordination groups:

             In appreciation for his vision, leadership and dedication
             the W3C XML Plenary on this 10th day of February, 2000
             reserves for Jon Bosak in perpetuity the XML name
             xml:Father */


/* This schema defines attributes and an attribute group
        suitable for use by
        schemas wishing to allow xml:base, xml:lang or xml:space attributes
        on elements they define.

        To enable this, such a schema must import this schema
        for the XML namespace, e.g. as follows:
        <schema . . .>
         . . .
         <import namespace="http://www.w3.org/XML/1998/namespace"
                    schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>

        Subsequently, qualified reference to any of the attributes
        or the group defined below will have the desired effect, e.g.

        <type . . .>
         . . .
         <attributeGroup ref="xml:specialAttrs"/>
 
         will define a type which will schema-validate an instance
         element with any of those attributes */


/* In keeping with the XML Schema WG's standard versioning
   policy, this schema document will persist at
   http://www.w3.org/2001/03/xml.xsd.
   At the date of issue it can also be found at
   http://www.w3.org/2001/xml.xsd.
   The schema document at that URI may however change in the future,
   in order to remain compatible with the latest version of XML Schema
   itself.  In other words, if the XML Schema namespace changes, the version
   of this document at
   http://www.w3.org/2001/xml.xsd will change
   accordingly; the version at
   http://www.w3.org/2001/03/xml.xsd will not change. */


/* In due course, we should install the relevant ISO 2- and 3-letter
         codes as the enumerated possible values . . . */
type XSD.Language Lang
with {
  variant "name as uncapitalized";
  variant "attribute";
};


type enumerated Space
{
	default_,
	preserve
}
with {
  variant "text 'default_' as 'default'";
  variant "defaultForEmpty as c_defaultForEmpty_1";
  variant "name as uncapitalized";
  variant "attribute";
};


/* See http://www.w3.org/TR/xmlbase/ for
                     information about this attribute. */
type XSD.AnyURI Base
with {
  variant "name as uncapitalized";
  variant "attribute";
};


const Space c_defaultForEmpty_1 := preserve;


type union Lang_1
{
	XSD.Language language_,
	enumerated {
		x
	} alt_
}
with {
  variant "name as 'lang'";
  variant "useUnion";
  variant "attribute";
  variant (language_) "name as 'language'";
  variant (alt_) "name as ''";
  variant (alt_) "text 'x' as ''";
};


type enumerated Space_1
{
	default_,
	preserve
}
with {
  variant "text 'default_' as 'default'";
  variant "name as 'space'";
  variant "attribute";
};


type XSD.AnyURI Base_1
with {
  variant "name as 'base'";
  variant "attribute";
};


type XSD.ID Id
with {
  variant "name as uncapitalized";
  variant "attribute";
};


}
with {
  encode "XML";
  variant "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
}
+101 −0
Original line number Diff line number Diff line
/*******************************************************************************
* Copyright (c) 2000-2018 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/6 R4B                       
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*******************************************************************************/
//
//  File:          urn_ietf_params_xml_ns_geopriv_conf.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Tue Aug  7 08:06:30 2018
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- RFC7459_pidf_lo.xsd
//			/* xml version = "1.0" */
//			/* targetnamespace = "urn:ietf:params:xml:ns:geopriv:conf" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module urn_ietf_params_xml_ns_geopriv_conf {


import from XSD all;


const PdfType c_defaultForEmpty_1 := unknown;


/* This schema defines an element that is used for indicating
         confidence in PIDF-LO documents. */


type ConfidenceType Confidence
with {
  variant "name as uncapitalized";
  variant "element";
};


type record ConfidenceType
{
	PdfType pdf optional,
	ConfidenceBase base
}
with {
  variant "name as uncapitalized";
  variant (pdf) "defaultForEmpty as c_defaultForEmpty_1";
  variant (pdf) "attribute";
  variant (base) "untagged";
};


type union ConfidenceBase
{
	XSD.Decimal alt_ (!0.0 .. !100.0),
	enumerated {
		unknown
	} alt_1
}
with {
  variant "name as uncapitalized";
  variant "useUnion";
  variant (alt_) "name as ''";
  variant (alt_1) "name as ''";
};


type enumerated PdfType
{
	normal,
	rectangular,
	unknown
}
with {
  variant "name as uncapitalized";
};


}
with {
  encode "XML";
  variant "namespace as 'urn:ietf:params:xml:ns:geopriv:conf' prefix 'conf'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
  variant "elementFormQualified";
}
Loading