FIXTradingCommunity / tablature

Easy authoring for rules of engagement using markdown
https://www.fixtrading.org/
Apache License 2.0
11 stars 8 forks source link

[orchestra2md] invalid handling of more than one appinfo #66

Open donmendelson opened 2 years ago

donmendelson commented 2 years ago

Reported by Hanno Klein: XML output generated by md2orchestra:

        <fixr:group id="2071" name="SecAltIDGrp" scenario="EXXXXX">
            <fixr:numInGroup id="454"/>
            <fixr:fieldRef id="455">
              <fixr:annotation>
                <fixr:appinfo purpose="P1">Hanno</fixr:appinfo>
                <fixr:appinfo purpose="P2">Klein</fixr:appinfo>
              </fixr:annotation>
            </fixr:fieldRef>
            <fixr:fieldRef id="456" scenario="EXXXXX"/>
        </fixr:group>

md output generated by orchestra2md:

### Group SecAltIDGrp scenario EXXXXX (2071)
| Name                | Tag | Scenario | Presence | P1    |
|---------------------|----:|----------|----------|-------|
| NoSecurityAltID     | 454 |          | optional |       |
| SecurityAltID       | 455 |          | optional | Klein |
| SecurityAltIDSource | 456 | EXXXXX   | optional |       |

Expected separate columns for P1 and P2.

donmendelson commented 2 years ago

For documentation, some headings are considered equivalent so they are combined, e.g. "documentation" and "description". Furthermore, they are ranked so synopsis always comes before elaboration, etc. Anything with unknown purpose is given the lowest rank. However, that logic does not apply to appinfo; every purpose must be considered unique, and there is no preset ranking.

donmendelson commented 2 years ago

Setting sequence so all appinfo follows documentation is their set order by purpose.

donmendelson commented 2 years ago

Corrected appinfo columns:

| Tag | Scenario | Presence | P1      | P2      |
|----:|----------|----------|---------|---------|
| 454 |          | optional |         |         |
| 455 |          | optional | [Hanno] | [Klein] |
| 456 | EXXXXX   | optional |         |         |