bartneck / swiML

A project to formalise swimming programs using XML
MIT License
2 stars 2 forks source link

lengthAsTime does not work. #101

Closed bartneck closed 1 month ago

bartneck commented 2 months ago

I created a new program, swiML/bookExamples/patterns/hand-crossing/hand-crossing-program-intro.xml, and it cannot be converted to HTML.

The required item type of the value of variable $instLengths is element(), but the supplied expression {text {"0"}} has item type text()

It only contains one instruction in which the length is expressed as lengthAsTime. I suspect that your layout calculations might not be able to handle non integer values. This might connect to the Roman numeral issue. We might have to find a more general solution.

    <instruction>
        <length>
            <lengthAsTime>PT5M33S</lengthAsTime>
        </length>
        <stroke>
            <standardStroke>any</standardStroke>
        </stroke>
        <intensity>
            <startIntensity>
                <zone>easy</zone>
            </startIntensity>
        </intensity>
    </instruction>
bartneck commented 2 months ago

I am not sure to which issue I should associate this error message. It seems to show for many Jasi Masters program now:

An empty sequence is not allowed as the first argument of myData:showLength()
calloc262 commented 1 month ago

should be a fix for this in the latest version

bartneck commented 1 month ago

Tested and okay.