Skip to content

Commit

Permalink
Add mdui:Description to generated IdP mdui:UIInfo
Browse files Browse the repository at this point in the history
Iterate on the generation of mdui:UIInfo for identitify providers which do not have mdui:UIInfo already. Reduces the number of warnings we get from the eduGAIN validator.
See ukf/ukf-meta#150.
  • Loading branch information
iay committed Nov 7, 2017
1 parent caa39fa commit 9c7b0c5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
6 changes: 4 additions & 2 deletions mdx/uk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ before being included in the `export` version consumed by interfederation partne
Status (2017-10-25):

* The export preview aggregate ensures that all UKf-registered identity providers have `mdui:DisplayName`
metadata by copying data from `md:OrganizationDisplayName` if required.
metadata by copying data from `md:OrganizationDisplayName` if required. The copying process also
generates `mdui:Description` elements with the same content.

## Production Maturity Pipeline

Expand Down Expand Up @@ -63,7 +64,8 @@ when it appeared in the fallback aggregate, which would be too late to take corr
Status (2017-10-25):

* The test aggregate ensures that all UKf-registered identity providers have `mdui:DisplayName`
metadata by copying data from `md:OrganizationDisplayName` if required.
metadata by copying data from `md:OrganizationDisplayName` if required. The copying process also
generates `mdui:Description` elements with the same content.

### Fallback Aggregate vs. Production Aggregate

Expand Down
22 changes: 17 additions & 5 deletions mdx/uk/odn_to_mdui.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
odn_to_mdui.xsl
If an identity provider does not have at least one MDUI-based discovery
name, give it one by copying data from its md:OrganizationDisplayName.
name, give it mdui:DisplayName and mdui:Description by copying data from
its md:OrganizationDisplayName.
This transform will only be applied to UKf-registered entities.
Expand Down Expand Up @@ -39,8 +40,8 @@
Match the md:IDPSSODescriptor/md:Extensions element of an identity provider
which does not have mdui:UIInfo.
We must fabricate the mdui:UIInfo as well as the mdui:DisplayName
elements.
We must fabricate the mdui:UIInfo as well as the mdui:DisplayName and
mdui:Description elements.
-->
<xsl:template match="/md:EntityDescriptor/md:IDPSSODescriptor/md:Extensions[not(mdui:UIInfo)]">
<xsl:variable name="odns" select="../../md:Organization/md:OrganizationDisplayName"/>
Expand All @@ -57,15 +58,16 @@
</xsl:template>

<!--
Make a new mdui:DisplayName for each of the md:OrganizationDisplayName
elements in the $odns parameter.
Make a new mdui:DisplayName and mdui:Description for each of the
md:OrganizationDisplayName elements in the $odns parameter.
Each of the new elements copies the value and xml:lang attribute of
the md:OrganizationDisplayName, and is indented appropriately to
appearing at the start of the enclosing mdui:UIInfo.
-->
<xsl:template name="generateDisplayNames">
<xsl:param name="odns"/>
<!-- Generate mdui:DisplayName elements. -->
<xsl:for-each select="$odns">
<xsl:text>&#10;&#9;&#9;&#9;&#9;</xsl:text>
<mdui:DisplayName>
Expand All @@ -75,6 +77,16 @@
<xsl:value-of select="."/>
</mdui:DisplayName>
</xsl:for-each>
<!-- Generate mdui:Description elements. -->
<xsl:for-each select="$odns">
<xsl:text>&#10;&#9;&#9;&#9;&#9;</xsl:text>
<mdui:Description>
<xsl:attribute name="xml:lang">
<xsl:value-of select="@xml:lang"/>
</xsl:attribute>
<xsl:value-of select="."/>
</mdui:Description>
</xsl:for-each>
</xsl:template>


Expand Down

0 comments on commit 9c7b0c5

Please sign in to comment.