POETSII / Orchestrator

The Orchestrator is the configuration and run-time management system for POETS platforms.
1 stars 1 forks source link

Orchestrator 1.0.0-alpha treats xmlns as irrelevant #200

Open m8pple opened 3 years ago

m8pple commented 3 years ago

In the 1.0.0-alpha docs the Graphs element is described as:

**Graphs**

This element exists because XML demands that a single root node exists in the
syntax tree.

This element must occur exactly once in each file. Valid attributes:

 - `xmlns` (must occur exactly once): Unused, ignored.

then in the examples it always has xmlns="".

This goes against the spec and means that tools will not be able to tell which grammar or variant of the xml we are dealing with. So far the XML has gone through v0, v1, v2, v2.2, v3, and v4, and I suspect we will need a v5. The xmlns attribute is important for working out which grammar a given input file works in. As we've transitioned between grammars this has been important for rejecting old xml, as otherwise you can waste loads of time trying to debug random mis-matches between xml producer and consumer. More recently, POETS-Ecosystem, ImPOLite, POEMS, and epoch_sim are all able to automatically switch between v3 and v4 parsers based on this attribute, it possible to use either version.

So: xmlns should always be "https://poets-project.org/schemas/virtual-graph-schema-v4", and it should either be rejected if it is different, or switch to a different parser if the alternative xmlns is known. Or if the 1.0.0-alpha version of v4 has breaking-changes compared to v4 from 2019 then we should call it v5 and teach other tools the new dialect (e.g. #199).

heliosfa commented 3 years ago

We will make that change