Skip to content

Commit

Permalink
Documentatie regels gerapporteerd, en plaats van meeteenheid
Browse files Browse the repository at this point in the history
Op basis van overleg met Geonovum is besloten de documentatieregels
(docrules) ook in het configuratie report op te nemen.
Ook is de plaats van enkele tagged values in de documentatie op verzoek
aangepast.

Minor.
  • Loading branch information
arjan authored and arjan committed Oct 30, 2024
1 parent 791cf54 commit bb938ee
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 27 deletions.
63 changes: 44 additions & 19 deletions src/main/resources/input/MIM/cfg/docrules/MIM12.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
</levels>
</doc-rule>

<doc-rule id="CFG-DOC-EENHEID" order="145">
<name lang="nl">Eenheid</name>
<name lang="en">Unit</name>
<levels>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-REFERENCEELEMENT</level>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-ATTRIBUTE</level>
</levels>
</doc-rule>

<doc-rule id="CFG-DOC-IDENTIFICATIE" order="015">
<name lang="nl">Identificatie</name>
<name lang="en">Identification</name>
Expand Down Expand Up @@ -78,23 +69,57 @@
</levels>
</doc-rule>

<doc-rule id="CFG-DOC-MINIMUMWAARDEEXCLUSIEF" order="147">
<name lang="nl">Minimum waarde (exclusief)</name>
<name lang="en">Minimum value (eclusive)</name>
<doc-rule id="CFG-DOC-EENHEID" order="115">
<name lang="nl">Eenheid</name>
<name lang="en">Unit</name>
<levels>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-REFERENCEELEMENT</level>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-DATAELEMENT</level>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-ATTRIBUTE</level>
</levels>
</doc-rule>

<doc-rule id="CFG-DOC-MAXIMUMWAARDEEXCLUSIEF" order="148">
<name lang="nl">Maximum waarde (exclusief)</name>
<name lang="en">Maximum value (eclusive)</name>
<doc-rule id="CFG-DOC-UNITOFMEASURE" order="115">
<name lang="nl">Meeteenheid</name>
<name lang="en">Unit of measure</name>
<levels>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-REFERENCEELEMENT</level>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-DATAELEMENT</level>
<level show="implied" compile="full" format="plain">DISPLAY-GLOBAL-ATTRIBUTE</level>
<level show="implied" compile="single" format="plain">DISPLAY-DETAIL-ATTRIBUTE</level>
</levels>
</doc-rule>

<doc-rule id="CFG-DOC-MINVALUEINCLUSIVE" order="141">
<name lang="nl">Minimumwaarde inclusief</name>
<name lang="en">MinInclusive</name>
<levels>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-ATTRIBUTE</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-REFERENCEELEMENT</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-DATAELEMENT</level>
</levels>
</doc-rule>
<doc-rule id="CFG-DOC-MINVALUEEXCLUSIVE" order="142">
<name lang="nl">Minimumwaarde exclusief</name>
<name lang="en">MinExclusive</name>
<levels>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-ATTRIBUTE</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-REFERENCEELEMENT</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-DATAELEMENT</level>
</levels>
</doc-rule>
<doc-rule id="CFG-DOC-MAXVALUEINCLUSIVE" order="143">
<name lang="nl">Maximumwaarde inclusief</name>
<name lang="en">MaxInclusive</name>
<levels>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-ATTRIBUTE</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-REFERENCEELEMENT</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-DATAELEMENT</level>
</levels>
</doc-rule>
<doc-rule id="CFG-DOC-MAXVALUEEXCLUSIVE" order="144">
<name lang="nl">Maximumwaarde exclusief</name>
<name lang="en">MaxExclusive</name>
<levels>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-ATTRIBUTE</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-REFERENCEELEMENT</level>
<level show="implied" compile="single" format="math">DISPLAY-DETAIL-DATAELEMENT</level>
</levels>
</doc-rule>

Expand Down
30 changes: 29 additions & 1 deletion src/main/resources/xsl/ConfigCompiler/ConfigCompiler-report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@
<div>
<h1>Conceptual schemas</h1>
<xsl:apply-templates select="." mode="metamodel-cs"/>
</div>
</div>
<div>
<h1>Documentation rules</h1>
<xsl:apply-templates select="." mode="docrules"/>
</div>
<div>
<h1>Visuals</h1>
<xsl:apply-templates select="." mode="metamodel-visuals"/>
Expand Down Expand Up @@ -316,6 +320,30 @@
</div>
</xsl:template>

<xsl:template match="/config" mode="docrules">
<div>
<h2>Documentation rules</h2>

<xsl:variable name="rows" as="element(tr)*">
<xsl:for-each select="$configuration-docrules-file//doc-rule">
<xsl:sort select="xs:integer(@order)"/>
<tr>
<td>
<xsl:sequence select="imf:show-name(.,position() != last())"/>
</td>
<td>
<xsl:value-of select="@order"/>
</td>
<td>
<xsl:sequence select="imf:get-src(name[1])"/>
</td>
</tr>
</xsl:for-each>
</xsl:variable>
<xsl:sequence select="imf:create-result-table-by-tr($rows,'label:40,order:20,config:40','table-docrules')"/>
</div>
</xsl:template>

<xsl:template match="config" mode="tree">
<ul>
<xsl:apply-templates select="includes" mode="tree"/>
Expand Down
9 changes: 2 additions & 7 deletions src/main/resources/xsl/OfficeCompiler/Imvert2modeldoc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,8 @@
</xsl:when>
<xsl:otherwise>
<xsl:variable name="tv-element" select="imf:get-most-relevant-compiled-taggedvalue-element($this,concat('##',$tv-id))"/>
<xsl:sequence select="imf:get-clean-documentation-string(imf:get-tv-value($tv-element))"/>
<xsl:variable name="tv-value" select="imf:get-tv-value($tv-element)"/>
<xsl:sequence select="if ($tv-value) then imf:get-clean-documentation-string($tv-value) else ()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
Expand Down Expand Up @@ -1458,12 +1459,6 @@
<xsl:when test="$doc-rule-id = 'CFG-DOC-IDENTIFICATIE'">
<xsl:sequence select="imf:create-part-2(.,imf:get-formatted-tagged-value-cfg(.,$this,'CFG-TV-IDENTIFICATIE'))"/>
</xsl:when>
<xsl:when test="$doc-rule-id = 'CFG-DOC-MAXIMUMWAARDEEXCLUSIEF'">
<xsl:sequence select="imf:create-part-2(.,imf:get-formatted-tagged-value-cfg(.,$this,'CFG-TV-MAXVALUEEXCLUSIVE'))"/>
</xsl:when>
<xsl:when test="$doc-rule-id = 'CFG-DOC-MINIMUMWAARDEEXCLUSIEF'">
<xsl:sequence select="imf:create-part-2(.,imf:get-formatted-tagged-value-cfg(.,$this,'CFG-TV-MINVALUEEXCLUSIVE'))"/>
</xsl:when>
<xsl:when test="$doc-rule-id = 'CFG-DOC-MIXIN'">
<xsl:sequence select="imf:create-part-2(.,imf:get-formatted-tagged-value-cfg(.,$this,'CFG-TV-MIXIN'))"/>
</xsl:when>
Expand Down

0 comments on commit bb938ee

Please sign in to comment.