Skip to content

Commit

Permalink
#5 EBA Filing Rules
Browse files Browse the repository at this point in the history
  • Loading branch information
John Nordberg committed Apr 28, 2024
1 parent 95c83d0 commit 63188a0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 15 additions & 2 deletions eba.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes" />
<xsl:variable name="eeacountrycodes" select="document('lookup/eea-countries.xml')/codes/code" />
<xsl:variable name="countrycodes" select="document('lookup/iso-3166-1.xml')/codes/code" />
<xsl:variable name="entrypoints" select="document('lookup/eba-entrypoints.xml')/entrypoints/entrypoint" />
<xsl:variable name="entrypoints"
select="document('lookup/eba-entrypoints.xml')/entrypoints/entrypoint" />
<xsl:include href="common.xslt" />

<xsl:variable name="ebavalidations" select="document('lookup/eba-filing-rules.xml')" />
Expand Down Expand Up @@ -184,7 +185,7 @@
</xsl:template>


<xsl:template match="find:fIndicators">
<xsl:template match="/xbrli:xbrl/find:fIndicators">
<xsl:variable name="contextRefs"
select="//find:filingIndicator[not(@contextRef=preceding::find:filingIndicator/@contextRef)]/@contextRef" />
<xsl:for-each select="$contextRefs">
Expand All @@ -209,6 +210,18 @@
</xsl:call-template>
</xsl:if>
</xsl:for-each>

<xsl:apply-templates />
</xsl:template>

<xsl:template match="/xbrli:xbrl/find:fIndicators/find:filingIndicator">
<xsl:variable name="href" select="/xbrli:xbrl/link:schemaRef/@xlink:href" />
<xsl:if test="not($entrypoints[./href=$href]/filing-indicators[./code=current()])">
<xsl:call-template name="EBAError">
<xsl:with-param name="code" select="'1.6.3'" />
<xsl:with-param name="context" select="." />
</xsl:call-template>
</xsl:if>
</xsl:template>

<xsl:template match="xi:include">
Expand Down
2 changes: 0 additions & 2 deletions lookup/eba-filing-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
avoided where not necessary.</control>
</rule>

<!-- 1.6.3 requires taxonomy -->

<rule>
<error_code>1.6.3</error_code>
<error_message>invalidFilingIndicatorValue</error_message>
Expand Down

0 comments on commit 63188a0

Please sign in to comment.