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”>
We will also need to:
create a new element to allow users to insert a valid element after the formula, similar to the inline following text (<inline name="AppendText">) used in quoted structure, and render it correctly in the PDF. This is to cover the scenario where there are a large number of formulas that all use the same letters which are defined in separate interpretation paragraph rather than after every formula (see https://lawmaker.atlassian.net/browse/LMS-169 and LDAPP-3498).
considering the above, we should also decide whether we want the <hcontainer name=”where”> with its //p and definitions to be automatically inserted after the formula or whether we should provide different options in the CCA and let the user chose the appropriate one (e.g. “Where (definitions); “following text”)
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) |
|