converters.csv_to_xes: the generated XES lacks standard declarations and flattens case attributes #28

Open
opened 2026-10-06 13:49:16 +00:00 by ffrauenberger · 1 comment
Owner

Severity: low (other tools can misread the generated XES)

Where

  • app/converters/csv_to_xes_converter.py:267-342

Problem

  • The generated <log> contains no <extension> declarations (Concept, Time, Lifecycle, Organizational), no <global> and no <classifier> elements. Strict XES consumers such as ProM/OpenXES import such files with warnings or lose attribute semantics.
  • xmlns is set as an ordinary attribute instead of through ElementTree namespace handling.
  • All extra CSV columns are written as event attributes. Columns such as case:xyz, which the XES→CSV converter produces from trace attributes, do not round-trip back to trace-level attributes.
  • xes.version="1.0" is declared, while the 2023 IEEE XES standard uses 2.0.

Steps to reproduce

  1. Convert an XES file with trace attributes to CSV
  2. Convert the resulting CSV back to XES
  3. Open the result in ProM, or compare it with the original file

Expected behavior

The XES file contains the standard extension declarations, and case:* columns become trace attributes again.

Actual behavior

No extension/global/classifier declarations; former trace attributes are written as event attributes.

Fix

Emit the standard extension headers, write case:* columns as trace attributes, and validate the output against the XES schema in tests.


from issues/BUG-028-xes-export-lacks-standard-declarations.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** low (other tools can misread the generated XES) ## Where - `app/converters/csv_to_xes_converter.py:267-342` ## Problem - The generated `<log>` contains no `<extension>` declarations (Concept, Time, Lifecycle, Organizational), no `<global>` and no `<classifier>` elements. Strict XES consumers such as ProM/OpenXES import such files with warnings or lose attribute semantics. - `xmlns` is set as an ordinary attribute instead of through ElementTree namespace handling. - All extra CSV columns are written as **event** attributes. Columns such as `case:xyz`, which the XES→CSV converter produces from trace attributes, do not round-trip back to trace-level attributes. - `xes.version="1.0"` is declared, while the 2023 IEEE XES standard uses `2.0`. ### Steps to reproduce 1. Convert an XES file with trace attributes to CSV 2. Convert the resulting CSV back to XES 3. Open the result in ProM, or compare it with the original file ### Expected behavior The XES file contains the standard extension declarations, and `case:*` columns become trace attributes again. ### Actual behavior No extension/global/classifier declarations; former trace attributes are written as event attributes. ## Fix Emit the standard extension headers, write `case:*` columns as trace attributes, and validate the output against the XES schema in tests. --- from `issues/BUG-028-xes-export-lacks-standard-declarations.md` (code analysis of commit 6bcc646, 2026-10-03)
Author
Owner

Reviewed by Codex (GPT-6) against origin/main 6bcc646eb464.

Review: partially correct.

The trace-attribute round-trip loss is confirmed: case:owner is emitted as an event attribute. The namespace bullet is not an XML defect: setting xmlns as done here serializes a valid default namespace. Serializing and reparsing the generated output yields {http://www.xes-standard.org/}log and namespaced descendants.

Please also separate schema validity from interoperability expectations. The published OpenXES schema gives extension, global and classifier minimum occurrence zero. The converter declares XES 1.0, so omission alone does not establish invalidity or prove ProM/OpenXES warnings. XES 2.0 is a possible upgrade target, not evidence that any 1.0 output is automatically broken. Consumer warnings/lost semantics need a concrete import reproduction.

Code references: app/converters/csv_to_xes_converter.py:284, app/converters/csv_to_xes_converter.py:334.

Reviewed by **Codex (GPT-6)** against origin/main [`6bcc646eb464`](https://code.swisdata.eu/ffrauenberger/ProcessIntel/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4). **Review: partially correct.** The trace-attribute round-trip loss is confirmed: `case:owner` is emitted as an event attribute. The namespace bullet is not an XML defect: setting `xmlns` as done here serializes a valid default namespace. Serializing and reparsing the generated output yields `{http://www.xes-standard.org/}log` and namespaced descendants. Please also separate schema validity from interoperability expectations. The published [OpenXES schema](https://www.xes-standard.org/_media/openxes%3Aopenxesdeveloperguide-1.9.pdf) gives `extension`, `global` and `classifier` minimum occurrence zero. The converter declares XES 1.0, so omission alone does not establish invalidity or prove ProM/OpenXES warnings. XES 2.0 is a possible upgrade target, not evidence that any 1.0 output is automatically broken. Consumer warnings/lost semantics need a concrete import reproduction. Code references: [app/converters/csv_to_xes_converter.py:284](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/converters/csv_to_xes_converter.py#L284), [app/converters/csv_to_xes_converter.py:334](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/converters/csv_to_xes_converter.py#L334).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#28
No description provided.