Skip to content

Commit

Permalink
Editor / Table mode / Fix field using directive (geonetwork#8261)
Browse files Browse the repository at this point in the history
* Editor / Table mode / Fix field using directive

eg. when using thesaurus for a field in a table, the field was not displayed.

```xml
<tableFields>
    <table fieldset="false" for="mac:MI_Instrument">
      <header>
        <col label="mac:MI_Instrument"/>
        <col label="mac:MI_Platform"/>
        <col/>
      </header>
      <row>
        <col xpath="mac:identifier/*/mcc:code"
             use="data-gn-keyword-picker">
          <directiveAttributes data-thesaurus-key="local.theme.cersat_sensor"/>
        </col>
        <col xpath="mac:mountedOn/*/mac:identifier/*/mcc:code"
             use="data-gn-keyword-picker">
          <directiveAttributes data-thesaurus-key="local.theme.cersat_platform"/>
        </col>
        <col del=".."/>
      </row>
    </table>
```

Follow up of geonetwork#8016

* Editor / Table mode / Fix field using directive / Review comment.
  • Loading branch information
fxprunayre authored Oct 10, 2024
1 parent 2df2bb1 commit 9228e4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/src/main/webapp/xslt/ui-metadata/form-builder.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,14 @@
<xsl:choose>
<xsl:when test="@use != ''">
<xsl:copy-of select="@use|directiveAttributes"/>

<xsl:if test="@xpath != ''">
<saxon:call-template name="{concat('evaluate-', $schema)}">
<xsl:with-param name="base" select="$base"/>
<xsl:with-param name="in"
select="concat('/', @xpath)"/>
</saxon:call-template>
</xsl:if>
</xsl:when>
<xsl:when test="@del != ''">
<xsl:attribute name="remove" select="'true'"/>
Expand Down

0 comments on commit 9228e4a

Please sign in to comment.