LMS-3093 Change Formula | Where clause mark-up
Summary of feature improvement
Change the Formula | Where clause model so that there is a clearer connection between the formula itself, the where clause and its definitions.
The agreed model is the following:
<paragraph xmlns=" http://docs.oasis-open.org/legaldocml/ns/akn/3.0"> <num>(1A)</num> <intro> <p>The hourly rate of pay ... is determined according to the formula—</p> </intro> <hcontainer name="formula"> <hcontainer name="math"> <content> <foreign> <math xmlns=" http://www.w3.org/1998/Math/MathML">...</math> </foreign> </content> </hcontainer> <hcontainer name="where"> <intro> <p>where—</p> </intro> <hcontainer name="definition"> <content> <p>A is the week’s pay mentioned in paragraph (1); and</p> </content> </hcontainer> <hcontainer name="definition"> <content> <p>B is the average number of hours worked....</p> </content> </hcontainer> </hcontainer> </hcontainer> </paragraph>
the <intro> is only the sentence preceding the math formula
the <tblock class=”formula”> becomes an <hcontainer name=”formula”> which wraps the math formula and the where clause with its definition
the <math> element is now wrapped by an <hconainter name=”math”>
an <hcontainer name=”where”> is added and wraps both the where clause and its definitions
the <p> where clause becomes and <intro>
each definitions becomes an <hcontainer name=”definition”>
Background
Whilst reviewing https://tsoltd.atlassian.net/browse/LEGDEV-6534 , Jim highlighted a couple of issues related with the mark-up of the formula in our AKN:
He noted that it is difficult from his side to write the transform from the AkN to the CLML, as there is no clear way to know that the children of the paragraph are definitions of things in the mathematical formula. In fact, currently, our AKN is a bit vague and ambiguous – this is what we currently produce:
<paragraph class="prov2">
<num>(1A)</num>
<intro>
<p>The hourly rate of pay ... is determined according to the formula—</p>
<tblock class="formula">
<foreign>
<math xmlns="http://www.w3.org/1998/Math/MathML "><mi>A</mi> <mo>÷</mo> <mi>B</mi></math>
</foreign>
</tblock>
<p>where—</p>
</intro>
<level class="unnumberedParagraph">
<content>
<p>A is the week’s pay mentioned in paragraph (1); and</p>
</content>
</level>
<level class="unnumberedParagraph">
<content>
<p>B is the average number of hours worked....</p>
</content>
</level>
</paragraph>
He also noted that the CLML mark-up of formulas is quite different from our AKN, highlighting his preference not to have two such different semantic models. In fact, in the CLML, the definitions of A and B are contained within the <Formula> element, suggesting that they’re part of the formula. By contrast, in the Akoma Ntoso they’re simply children of <paragraph>, without any suggestion from the tagging that they have anything to do with a mathematical formula.
After a few discussions, we agreed that the Lawmaker AKN model for formulas should change so that there is a clearer connection between the formula itself and the definitions, and we agreed on the model outlined under ‘Summary of feature improvement’
Status | Feature logged |
---|---|
Lawmaker components affected | XML |
Raised by organisation(s) | TNA |
Planned version to be included in (if any) |
|
Related development ticket(s) |
|