From bb399dcc0055fdca3750ceef4c88afafe63bbb92 Mon Sep 17 00:00:00 2001
From: Botond Baranyi <botond.baranyi@ericsson.com>
Date: Fri, 31 Aug 2018 10:19:21 +0200
Subject: [PATCH] Moved latest changes in reference guide doc to asciidoc

Change-Id: Ic4c86da23fc695263597d5c532fb2177fa753d6d
Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
---
 .../4-ttcn3_language_extensions.adoc          | 83 +++++++++++++++++++
 .../8-the_titan_project_descriptor_file.adoc  |  1 +
 .../9-xsd_to_ttcn-3_converter.adoc            |  6 +-
 usrguide/referenceguide/ReferenceGuide.adoc   |  6 +-
 4 files changed, 93 insertions(+), 3 deletions(-)

diff --git a/usrguide/referenceguide/4-ttcn3_language_extensions.adoc b/usrguide/referenceguide/4-ttcn3_language_extensions.adoc
index 80039216a..a0fa56edd 100644
--- a/usrguide/referenceguide/4-ttcn3_language_extensions.adoc
+++ b/usrguide/referenceguide/4-ttcn3_language_extensions.adoc
@@ -3353,6 +3353,89 @@ with {variant (field3) "REPEATABLE(no)"}
 //the elements of the field3 must be groupped together.
 ----
 
+*FORCEOMIT*
+
+Attribute syntax: `FORCEOMIT(<parameter>)`
+
+Parameters allowed: list of TTCN-3 field identifiers (can also be nested)
+
+Default value: none
+
+Can be used with: fields of a `record`/`set`.
+
+Description: Forces the lower-level optional field(s) specified by the parameters to always be omitted.
+
+NOTE: It has no effect during encoding. It only affects the specified fields (which are probably in a different type definition) if they are decoded as part of the type this instruction is applied to.
+
+Examples:
+[source]
+----
+type record InnerRec {
+  integer opt1 optional,
+  integer opt2 optional,
+  integer opt3 optional,
+  integer mand
+}
+
+// Note: decoding a value of type InnerRec alone does not force any of the
+// fields mentioned in the variants below to be omitted 
+
+type record OuterRec1 {
+  integer f1,
+  InnerRec f2,
+  integer f3
+}
+with {
+  variant (f2) "FORCEOMIT(opt1)"
+}
+
+// Decoding ‘0102030405’O into a value of type OuterRec1 results in:
+// {
+//   f1 := 1,
+//   f2 := { opt1 := omit, opt2 := 2, opt3 := 3, mand := 4 },
+//   f3 := 5
+// }
+
+type record OuterRec2 {
+  OuterRec1 f
+}
+with {
+  variant (f) "FORCEOMIT(f2.opt2)"
+}
+
+// Decoding ‘01020304’O into a value of type OuterRec2 results in:
+// {
+//   f := {
+//     f1 := 1,
+//     f2 := { opt1 := omit, opt2 := omit, opt3 := 2, mand := 3 },
+//     f3 := 4
+//   }
+// }
+
+type record OuterRec3 {
+  OuterRec1 f1,
+  OuterRec1 f2
+}
+with {
+  variant (f1) "FORCEOMIT(f2.opt2, f2.opt3)"
+  variant (f2) "FORCEOMIT(f2.opt2), FORCEOMIT(f2.opt3)"
+}
+
+// Decoding ‘010203040506’O into a value of type OuterRec3 results in:
+// {
+//   f1 := {
+//     f1 := 1,
+//     f2 := { opt1 := omit, opt2 := omit, opt3 := omit, mand := 2 },
+//     f3 := 3
+//   },
+//   f2 := {
+//     f1 := 4,
+//     f2 := { opt1 := omit, opt2 := omit, opt3 := omit, mand := 5 },
+//     f3 := 6
+//   }
+// }
+----
+
 ==== Type-specific attributes
 
 *IntX*
diff --git a/usrguide/referenceguide/8-the_titan_project_descriptor_file.adoc b/usrguide/referenceguide/8-the_titan_project_descriptor_file.adoc
index 3bd9a2ab7..772def389 100644
--- a/usrguide/referenceguide/8-the_titan_project_descriptor_file.adoc
+++ b/usrguide/referenceguide/8-the_titan_project_descriptor_file.adoc
@@ -628,3 +628,4 @@ In the command line referenced projects are identified by the location of their
 In eclipse all information is persisted by the platform, as such the closing and re-opening of the workspace will not change any project information, or come with data loss.
 
 This is our own project information; it can not be expected from external tool vendors to support it. As such exporting/importing a project via the ClearCase Remote Client will not be possible using this format, or might not produce the expected results.
+
diff --git a/usrguide/referenceguide/9-xsd_to_ttcn-3_converter.adoc b/usrguide/referenceguide/9-xsd_to_ttcn-3_converter.adoc
index e98f08cdf..ea394536b 100644
--- a/usrguide/referenceguide/9-xsd_to_ttcn-3_converter.adoc
+++ b/usrguide/referenceguide/9-xsd_to_ttcn-3_converter.adoc
@@ -30,7 +30,7 @@ An XML Schema is represented by a set of schema documents forming a complete spe
 The command line syntax of the converter is the following:
 
 [source]
-xsd2ttcn [-ceghmpstVwx] [-f file] [-J file] schema.xsd [-schema.xsd…]
+xsd2ttcn [-ceghmopstVwx] [-f file] [-J file] schema.xsd [-schema.xsd…]
 
 or
 
@@ -69,6 +69,10 @@ Instructs the converter to generate TTCN-3 code allowing type substitution.
 +
 Instructs the converter to only generate the `UsefulTtcn3Types` and `XSD` predefined modules.
 
+* `-o`
++
+Generates all definitions into one module, called `XSD_Definitions`, instead of generating separate modules for each target namespace. The module contains one group for each target namespace.
+
 * `-p`
 +
 Disables the generation of `UsefulTtcn3Types` and `XSD` predefined modules.
diff --git a/usrguide/referenceguide/ReferenceGuide.adoc b/usrguide/referenceguide/ReferenceGuide.adoc
index 80bf5e044..9576bb4c3 100644
--- a/usrguide/referenceguide/ReferenceGuide.adoc
+++ b/usrguide/referenceguide/ReferenceGuide.adoc
@@ -1,14 +1,16 @@
 ---
 Author: Jenő Balaskó
 Version: 2/198 17-CRL 113 200/6, Rev. PE1
-Date: 2018-06-18
+Date: 2018-07-25
 
 ---
 = Programmers' Technical Reference Guide for the TITAN TTCN-3 Toolset
 :author: Jenő Balaskó
 :revnumber: 2/198 17-CRL 113 200/6, Rev. PE1
-:revdate: 2018-06-18
+:revdate: 2018-07-25
 :title-logo-image: images/titan_logo.png
+:sectnums:
+:doctype: book
 :toc:
 
 ifdef::env-github,backend-html5[]
-- 
GitLab