/******************************************************************************
* Copyright (c) 2000-2021 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator
*
* 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
*
* Contributors:
*   Balasko, Jeno
*   Szabo, Bence Janos
*
******************************************************************************/
//
//  File:          www_XmlTest_org_complex_unique.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Tue Dec 15 11:00:27 2014
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- XmlTest_complex_unique.xsd
//			/* xml version = "1.0" */
//			/* targetnamespace = "www.XmlTest.org/complex_unique" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module www_XmlTest_org_complex_unique {


import from XSD all;


/* This documentum tests based on
      XML Schema Part 0: Primer Second Edition
      5 Advanced Concepts III. The Quantity Report
      5.1 Specifying Uniqueness
      XML Schema Part 1: Structures Second Edition
      3.11.2 XML Representation of Identity-constraint Definition Schema Components */


type record PurchaseReport
{
	XSD.Duration period optional,
	XSD.Date periodEnding optional,
	RegionsType regions,
	PartsType parts
}
with {
  variant "name as uncapitalized";
  variant "element";
  variant (period) "attribute";
  variant (periodEnding) "attribute";
};


type record RegionsType
{
	record length(1 .. infinity) of record {
		XSD.PositiveInteger code optional,
		record length(1 .. infinity) of record {
			XSD.String number optional,
			XSD.PositiveInteger quantity optional
		} part_list
	} zip_list
}
with {
  variant (zip_list) "untagged";
  variant (zip_list[-]) "name as 'zip'";
  variant (zip_list[-].code) "attribute";
  variant (zip_list[-].part_list) "untagged";
  variant (zip_list[-].part_list[-]) "name as 'part'";
  variant (zip_list[-].part_list[-].number) "attribute";
  variant (zip_list[-].part_list[-].quantity) "attribute";
};


type record PartsType
{
	record length(1 .. infinity) of record {
		XSD.String number optional,
		XSD.String base
	} part_list
}
with {
  variant (part_list) "untagged";
  variant (part_list[-]) "name as 'part'";
  variant (part_list[-].number) "attribute";
  variant (part_list[-].base) "untagged";
};


}
with {
  encode "XML";
  variant "namespace as 'www.XmlTest.org/complex_unique' prefix 'r3'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
  variant "elementFormQualified";
}
