Skip to content

eForms SDK 2.0.0-alpha.6

Pre-release
Pre-release

Choose a tag to compare

@rousso rousso released this 30 Nov 02:22
a0ef896

eForms SDK 2.0.0-alpha.6 release notes

SDK 2.0.0-alpha.6 is the sixth in a series of pre-releases of the upcoming eForms SDK 2.0.0, building on alpha.1, alpha.2, alpha.3, alpha.4 and alpha.5.

This is a pre-release

Please be aware that this is a pre-release version intended to give you a chance to preview and follow the development of the next major version of the SDK.

Objective

The goal of SDK 2 is to introduce a new version of EFX (the eForms Expression Language) that:

  • enhances the template definition vocabulary to allow more accurate and user-friendly notice visualisation that is easier to maintain and share;
  • improves the ability of the language to express business rules with completeness and simplicity, enabling porting of validation rules to engines other than Schematron and supporting live validation on different target platforms;
  • enhances the language in ways that improve its expressiveness and readability, making it easier to write, read, maintain and interpret.

Contents

This pre-release contains the following changes since alpha.5. The validation rules and the view templates of the SDK already use the new forms.

New EFX features

Expressions

  • Casts are no longer necessary, and the grammar no longer accepts them. A single value can be used where a list is expected, and nodes can be counted.

Templates

  • A template that other lines call is now declared in a section of its own, which starts with the heading --- TEMPLATE name ---. The section contains the parameters of the template, if any, and the lines it displays. These sections replace the earlier declarations with LET template:.
  • Each template line can have a fixed outline number, the next number at its level, or no number. A line without a number can carry a tag, so that the navigation can refer to it. A line is numbered only if it starts with a number or a question mark. Lines that used to receive a number automatically now need a question mark at the start. The number 0 is no longer accepted at the start of a line.
  • In a line that is not a heading, a colon now separates a caption from the content, for example "Title: Construction of a school". The colon itself is not displayed. The application receives the caption and the content separately and decides how to present them. In a heading, colons are displayed as written. A colon that is part of the text is written with a backslash before it. Each template of the line, and each alternative of a conditional line, can contain only one colon without a backslash. A colon at the end of a template is displayed, and that template has no caption.
  • A view template can have a header section. It displays the parts of the header of the notice, such as its title and its publication date, in a fixed order.
  • A template line can be displayed as an item of a bulleted list. Such a line can have a caption, but it cannot call another template. The header section cannot contain bulleted lines.

Rules

  • A rule set can apply to every element of a node or field, with the words WITH EVERY. It then also applies to the elements that the conditions on the last step of the path would exclude. The conditions on the earlier steps still apply.
  • A rule can state directly what a field or node requires, instead of giving an expression. These statements are called semantic assertions. They can say, for example, that a field is mandatory, forbidden or not repeated. They can limit its length, its number of occurrences or its range of values, restrict its values to a codelist or a pattern, or forbid changes, additions or removals. An application, such as an online form, can use them to configure the field, so that users cannot enter a wrong value. The validation checks them like any other rule. In the SDK, 2 895 rules are now written in this form. The Schematron generated from them checks the same conditions as before, sometimes in a different order. Semantic assertions introduce 15 new keywords in capitals, such as IS, NOT and EMPTY, in the expressions of rules and of templates.

Other EFX changes

Expressions

  • A position in a list is now always written with the word "at": the first element of a list is [at 1]. A condition in square brackets only filters the list.
  • The shortcuts for the current, parent and root element can no longer be used as a context. The node or field is named instead.
  • A context override can only follow a context variable. A selector can no longer read an attribute through a context override.
  • Aliases are no longer accepted. Fields and nodes are referred to by their identifier.
  • A codelist is written in one way only: [...name]. The earlier form with # is removed.
  • The forms of EFX version 1 are no longer accepted in EFX 2. A single expression starts with WITH, followed by COMPUTE or SELECT. The fields of the SDK already use this form.
  • Statement keywords, such as WITH and LET, are written in capitals. Expression keywords, such as "every" and "at", are written in lower case.
  • Some expressions are grouped differently. For example, a test whether a value is in a list is now evaluated before a comparison of equality. Parentheses make the intended grouping explicit.
  • A context variable of a field gives the value of the field, as the field itself does. A conditional expression gives a list when one of its branches gives a list.
  • A name that starts with two underscores cannot be declared.
  • Correction: a decimal number can now have more than one digit before the decimal point. Previously, a number such as 12.5 caused a syntax error.

Templates

  • The heading --- MAIN --- marks the start of the main template lines. It is required after template sections, and optional in a file without them.
  • The template lines of EFX version 1 are no longer accepted. A line displays content with DISPLAY, or calls another template, and it can name its context with WITH.
  • An expression after DISPLAY is written inside ${ }. The option "no-unit" after a style is removed.
  • A line that calls a template cannot have an outline number, a tag or lines nested under it, because the template is displayed in its place. In all its alternatives, a line either displays content or calls a template.

Rules

  • Each rule now ends with a semicolon, including the last rule of a rule set. No further semicolon is written after the rule set. A semicolon can also end an include line and a single expression.
  • In the list of notice subtypes after IN, each subtype is read as a whole. A dash therefore always marks a range, as in E1-E6. The text of the rules does not change.

Tools that read the grammar

The rules and tokens of the grammar are reorganised and many are renamed, so tools built on the grammar files need to be updated. A parameter value given to the EFX translator is now written without braces.

Metadata changes

  • 29 new rules, in stage 6m, check a notice against notices already published, through a service of TED Monitor. They are included in the dynamic Schematron only. The validator provides the address of the service when it runs.
  • The Schematron files now require an XSLT 3.0 processor, such as Saxon 12.
  • Stage 1m is now written in EFX, and its Schematron is generated. Validation results do not change.
  • 67 new rules in stages 4 and 5, from the eForms Metadata Database.
  • Each of the 51 view templates now has a header, a summary and a navigation section after its main section. They display the notice as the TED website does. The main sections are also corrected where they differed from the TED website, for example in the buyer heading, in the results of each lot and in the line about variants. Missing sections are added: strategic procurement in T01 and T02, techniques in E6, and the tenders that did not win in 25, 28, 38, 39, 40, E5 and E6. A heading with no content under it is no longer displayed. In T02, English text written in the template is replaced by labels and by values from the notice. Test content is removed.
  • New labels: "Summary", "Table of contents", "See the notice on TED website" and "Change notice", in all 24 languages, and "Buyers" and "Lots", in English only for now.

Download

You can download the latest version of the eForms SDK from GitHub.

GitHub release