ukf / ukf-testbed

UK federation tooling testbed
Apache License 2.0
1 stars 1 forks source link

Add tests for check_hoksso #28

Closed philsmart closed 8 months ago

philsmart commented 9 months ago

Neither template <xsl:template match="hoksso:*"> or <xsl:template match="@hoksso:*[local-name() != 'ProtocolBinding']"> have test coverage in this PR.

Some explanation from @iay.

... The way XSLT chooses nodes to evaluate the template expressions against is deterministic. It starts by looking at the root node. Then, there will be "apply-templates" rules recursing down the tree in particular orders. Some of these are predefined, some of them are in the check_framework file:

<xsl:template match="*">
    <xsl:apply-templates select="node()|@*"/>
</xsl:template>

In this case, we process the md:whatever node earlier because we reach it in the traversal order earlier because we're not doing anything complicated, just descending in the default fashion through repeated applications of that rule I just quoted. There is no apply-templates within the rule for the md:whatever so if it fires, nothing inside the element that triggered that rule will ever be looked at as a candidate for matching against some other rule.

So those particular templates are not evaluated. This will need looking into this long term. However, this particular profile is not well used, and any errors that I attempt to trigger those rules trigger other checking rules anyway.