/******************************************************************************
 * Copyright (c) 2000-2025 Ericsson Telecom AB
 * 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:
 *   Szabo, Bence Janos
 *
 ******************************************************************************/
module schema {


import from XSD all;


type union E21unnamed
{
	XSD.String alt_,
	XSD.NormalizedString alt_1,
	XSD.Token alt_2,
	XSD.Name alt_3,
	XSD.NMTOKEN alt_4,
	XSD.NCName alt_5,
	XSD.ID alt_6,
	XSD.IDREF alt_7,
	XSD.ENTITY alt_8,
	XSD.HexBinary alt_9,
	XSD.Base64Binary alt_10,
	XSD.AnyURI alt_11,
	XSD.Language alt_12,
	XSD.Integer alt_13,
	XSD.PositiveInteger alt_14,
	XSD.NonPositiveInteger alt_15,
	XSD.NegativeInteger alt_16,
	XSD.NonNegativeInteger alt_17,
	XSD.Long alt_18,
	XSD.UnsignedLong alt_19,
	XSD.Int alt_20,
	XSD.UnsignedInt alt_21,
	XSD.Short alt_22,
	XSD.UnsignedShort alt_23,
	XSD.Byte alt_24,
	XSD.UnsignedByte alt_25,
	XSD.Decimal alt_26,
	XSD.Float alt_27,
	XSD.Double alt_28,
	XSD.Duration alt_29,
	XSD.DateTime alt_30,
	XSD.Time alt_31,
	XSD.Date alt_32,
	XSD.GYearMonth alt_33,
	XSD.GYear alt_34,
	XSD.GMonthDay alt_35,
	XSD.GDay alt_36,
	XSD.GMonth alt_37,
	XSD.Boolean alt_38
}
with {
  variant "name as uncapitalized";
  variant "useUnion";
  variant (alt_) "name as ''";
  variant (alt_1) "name as ''";
  variant (alt_2) "name as ''";
  variant (alt_3) "name as ''";
  variant (alt_4) "name as ''";
  variant (alt_5) "name as ''";
  variant (alt_6) "name as ''";
  variant (alt_7) "name as ''";
  variant (alt_8) "name as ''";
  variant (alt_9) "name as ''";
  variant (alt_10) "name as ''";
  variant (alt_11) "name as ''";
  variant (alt_12) "name as ''";
  variant (alt_13) "name as ''";
  variant (alt_14) "name as ''";
  variant (alt_15) "name as ''";
  variant (alt_16) "name as ''";
  variant (alt_17) "name as ''";
  variant (alt_18) "name as ''";
  variant (alt_19) "name as ''";
  variant (alt_20) "name as ''";
  variant (alt_21) "name as ''";
  variant (alt_22) "name as ''";
  variant (alt_23) "name as ''";
  variant (alt_24) "name as ''";
  variant (alt_25) "name as ''";
  variant (alt_26) "name as ''";
  variant (alt_27) "name as ''";
  variant (alt_28) "name as ''";
  variant (alt_29) "name as ''";
  variant (alt_30) "name as ''";
  variant (alt_31) "name as ''";
  variant (alt_32) "name as ''";
  variant (alt_33) "name as ''";
  variant (alt_34) "name as ''";
  variant (alt_35) "name as ''";
  variant (alt_36) "name as ''";
  variant (alt_37) "name as ''";
  variant (alt_38) "name as ''";
  //variant (alt_38) "text 'true' as '1'";
  //variant (alt_38) "text 'false' as '0'";
};


type E21unnamed UnnamedType
with {
  variant "element";
};


type union E21named
{
	XSD.String string,
	XSD.NormalizedString normalizedString,
	XSD.Token token,
	XSD.Name name,
	XSD.NMTOKEN nMTOKEN,
	XSD.NCName nCName,
	XSD.ID iD,
	XSD.IDREF iDREF,
	XSD.ENTITY eNTITY,
	XSD.HexBinary hexBinary,
	XSD.Base64Binary base64Binary,
	XSD.AnyURI anyURI,
	XSD.Language language_,
	XSD.Integer integer_,
	XSD.PositiveInteger positiveInteger,
	XSD.NonPositiveInteger nonPositiveInteger,
	XSD.NegativeInteger negativeInteger,
	XSD.NonNegativeInteger nonNegativeInteger,
	XSD.Long long,
	XSD.UnsignedLong unsignedLong,
	XSD.Int int,
	XSD.UnsignedInt unsignedInt,
	XSD.Short short,
	XSD.UnsignedShort unsignedShort,
	XSD.Byte byte,
	XSD.UnsignedByte unsignedByte,
	XSD.Decimal decimal,
	XSD.Float float_,
	XSD.Double double,
	XSD.Duration duration,
	XSD.DateTime dateTime,
	XSD.Time time,
	XSD.Date date,
	XSD.GYearMonth gYearMonth,
	XSD.GYear gYear,
	XSD.GMonthDay gMonthDay,
	XSD.GDay gDay,
	XSD.GMonth gMonth,
	XSD.Boolean boolean_
}
with {
  variant "name as uncapitalized";
  variant "useUnion";
  variant (name) "name as capitalized";
  variant (nMTOKEN) "name as capitalized";
  variant (nCName) "name as capitalized";
  variant (iD) "name as capitalized";
  variant (iDREF) "name as capitalized";
  variant (eNTITY) "name as capitalized";
  variant (language_) "name as 'language'";
  variant (integer_) "name as 'integer'";
  variant (float_) "name as 'float'";
  variant (boolean_) "name as 'boolean'";
  //variant (boolean_) "text 'true' as '1'";
  //variant (boolean_) "text 'false' as '0'";
};


type E21named NamedType
with {
  variant "element";
  
  variant "namespace as 'schema' prefix 'xsd0'"; // this will force the perfix of the XSD schema to be xsd1
};


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