Speech-Rule-Engine / speech-rule-engine

Generating speech descriptions for XML structures
https://zorkow.github.io/speech-rule-engine/
Apache License 2.0
75 stars 39 forks source link

Nested tables not announcing their row count #689

Open klobetime opened 1 year ago

klobetime commented 1 year ago

With Clearspeak, using tables usually results in the number of rows being prefixed to the speech string, something line "2 lines Line 1: xxx Line 2: yyy" which is fine. But when using nested tables, only the outermost table seems to have the total rows added:

<math>
  <mtable>
    <mtr>
      <mtd>
        <mtable>
          <mtr>
            <mtd>
              <mn>100</mn>
            </mtd>
          </mtr>
          <mtr>
            <mtd>
              <mn>200</mn>
            </mtd>
          </mtr>
        </mtable>
      </mtd>
    </mtr>
    <mtr>
      <mtd>
        <mtable>
          <mtr>
            <mtd>
              <mn>300</mn>
            </mtd>
          </mtr>
          <mtr>
            <mtd>
              <mn>400</mn>
            </mtd>
          </mtr>
        </mtable>
      </mtd>
    </mtr>
  </mtable>
</math>

Results in

2 lines Line 1: Line 1: 100 Line 2: 200 Line 2: Line 1: 300 Line 2: 400

rather than

2 lines Line 1: 2 lines Line 1: 100 Line 2: 200 Line 2: 2 lines Line 1: 300 Line 2: 400

Not a huge issue as nested tables are generally confusing to begin with, but thought I'd share.

klobetime commented 1 year ago

Note that I'm using v4.0.6 -- haven't tried with the current beta yet.

zorkow commented 1 year ago

Thanks for reporting this.

I don't think the current beta does have any changes for this, but I'll check.