| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
| 3 | * |
| 4 | * XSD to TTCN-3 Translator version: CRL 113 200/5 R3A |
| 5 | * |
| 6 | * All rights reserved. This program and the accompanying materials |
| 7 | * are made available under the terms of the Eclipse Public License v1.0 |
| 8 | * which accompanies this distribution, and is available at |
| 9 | * http://www.eclipse.org/legal/epl-v10.html |
| 10 | *******************************************************************************/ |
| 11 | // |
| 12 | // File: www_example_org_type_substitution_rename_e.ttcn |
| 13 | // Description: |
| 14 | // References: |
| 15 | // Rev: |
| 16 | // Prodnr: |
| 17 | // Updated: Wed Nov 25 14:43:08 2014 |
| 18 | // Contact: http://ttcn.ericsson.se |
| 19 | // |
| 20 | //////////////////////////////////////////////////////////////////////////////// |
| 21 | // Generated from file(s): |
| 22 | // - type_substitution_rename_e.xsd |
| 23 | // /* xml version = "1.0" */ |
| 24 | // /* targetnamespace = "www.example.org/type/substitution/rename/e" */ |
| 25 | //////////////////////////////////////////////////////////////////////////////// |
| 26 | // Modification header(s): |
| 27 | //----------------------------------------------------------------------------- |
| 28 | // Modified by: |
| 29 | // Modification date: |
| 30 | // Description: |
| 31 | // Modification contact: |
| 32 | //------------------------------------------------------------------------------ |
| 33 | //////////////////////////////////////////////////////////////////////////////// |
| 34 | |
| 35 | |
| 36 | module www_example_org_type_substitution_rename { |
| 37 | |
| 38 | |
| 39 | import from XSD all; |
| 40 | |
| 41 | |
| 42 | type record Complex |
| 43 | { |
| 44 | ParentType parentType, |
| 45 | ParentType_derivations sd |
| 46 | } |
| 47 | with { |
| 48 | variant "element"; |
| 49 | }; |
| 50 | |
| 51 | |
| 52 | type ParentType_derivations ParentType |
| 53 | with { |
| 54 | variant "name as uncapitalized"; |
| 55 | variant "element"; |
| 56 | }; |
| 57 | |
| 58 | |
| 59 | type record ParentType_1 |
| 60 | { |
| 61 | record of XSD.String foo_list |
| 62 | } |
| 63 | with { |
| 64 | variant "name as 'ParentType'"; |
| 65 | variant (foo_list) "untagged"; |
| 66 | variant (foo_list[-]) "name as 'foo'"; |
| 67 | }; |
| 68 | |
| 69 | |
| 70 | type RestrictedType_1 RestrictedType |
| 71 | with { |
| 72 | variant "element"; |
| 73 | }; |
| 74 | |
| 75 | |
| 76 | type record RestrictedType_1 |
| 77 | { |
| 78 | record length(1 .. infinity) of XSD.String foo_list |
| 79 | } |
| 80 | with { |
| 81 | variant "name as 'restrictedType'"; |
| 82 | variant (foo_list) "untagged"; |
| 83 | variant (foo_list[-]) "name as 'foo'"; |
| 84 | }; |
| 85 | |
| 86 | |
| 87 | type union ParentType_derivations |
| 88 | { |
| 89 | ParentType_1 parentType, |
| 90 | RestrictedType_1 restrictedType |
| 91 | } |
| 92 | with { |
| 93 | variant "useType"; |
| 94 | variant (parentType) "name as capitalized"; |
| 95 | }; |
| 96 | |
| 97 | |
| 98 | } |
| 99 | with { |
| 100 | encode "XML"; |
| 101 | variant "namespace as 'www.example.org/type/substitution/rename' prefix 'this'"; |
| 102 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; |
| 103 | } |