ETSI's Bug Tracker - Part 09: Using XML with TTCN-3
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0008201 | Part 09: Using XML with TTCN-3 | Clarification | public | 20-03-2023 09:48 | 19-01-2024 11:25

Reporter | Martin Hauch |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | won't fix |
Platform |  | OS |  | OS Version |
Product Version | 4.11.1 (published 2020-05) |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 6.2.11 but same problem for other base-types
For STF discussion |
Source (company - Author) | Devoteam GmbH, Martin Hauch

Summary | 0008201: Handling empty element-values

Description

<element name="DigestValue" type="ds:DigestValueType"/>
<simpleType name="DigestValueType">
<restriction base="base64Binary"/>
</simpleType>
How should the following value be handled in TTCN-3?
<DigestValue/>
The element DigestValue is present so it is valid xml-value. But which template in TTCN-3 matches this value?
template DigestValue tOmit:=omit; // should not match as the element is present
template DigestValue tAnyValue:=?; // perhaps should match as the element is present, but what is the value, if you try to save it to a variable?

Steps To Reproduce |
Additional Information | Example is taken from file xmldsig-core-schema.xsd from project MCX_eutra_IWD22wk49
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
20-03-2023 09:48 | Martin Hauch | New Issue |
05-09-2023 09:21 | Jens Grabowski | Note Added: 0016512 |
05-09-2023 09:22 | Jens Grabowski | Assigned To | => Tomas Urban
05-09-2023 09:22 | Jens Grabowski | Status | new => assigned
10-11-2023 10:58 | Tomas Urban | Note Added: 0016579 |
10-11-2023 10:59 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
10-11-2023 10:59 | Tomas Urban | Status | assigned => confirmed
19-01-2024 11:25 | Jens Grabowski | Note Added: 0016599 |
19-01-2024 11:25 | Jens Grabowski | Status | confirmed => closed
19-01-2024 11:25 | Jens Grabowski | Resolution | open => won't fix

Notes

(0016512)
Jens Grabowski
05-09-2023 09:21

TTF discussion: Clarification needed.

(0016579)
Tomas Urban
10-11-2023 10:58

The value of an empty element is an empty string. You can find the main guidelines in clause 3.1 of World Wide Web Consortium W3C® Recommendation: "Extensible Markup Language (XML) 1.1". Additionally, the concept of empty elements and their string value can be derived from the definition of elements with no content described in this specification.
As the XSD base64Binary type translates to an octetstring in TTCN-3, the correct result of decoding would be ''O meaning that tOmit wouldn't match and tAnyValue would produce a successful match, exactly as assumed.
Hopefully this clarification is satisfactory. I don't think it is necessary to change anything in part 9 as the rules specifying values of XML elements are described in the XML specification.

(0016599)
Jens Grabowski
19-01-2024 11:25

Explanation in comment from 10-11-2023, 10:58.