Skip to content

Commit

Permalink
Update to specification WD06, 16-Nov-2010.
Browse files Browse the repository at this point in the history
Added Keywords element.  Renumbered sections.
Added a check for https:// URLs for logos.
  • Loading branch information
iay committed Nov 18, 2010
1 parent b2c0536 commit aaf5924
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions build/check_mdui.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
http://wiki.oasis-open.org/security/SAML2MetadataUI
This ruleset reflects WD04, 4-Nov-2010.
This ruleset reflects WD06, 16-Nov-2010.
Some of these rules are simply checks on schema validity; those can
probably be removed and replaced by direct checks against the schema.
Expand Down Expand Up @@ -43,7 +43,7 @@
</xsl:template>

<!--
Section 2.1
Section 2.1, 2.2
Restrict the elements in this namespace which can appear directly within md:Extensions
to the two defined container elements. This will catch mis-spelled containers.
Expand All @@ -59,7 +59,7 @@
</xsl:template>

<!--
Section 2.1
Section 2.1.1
The <mdui:UIInfo> container element [...] MUST appear within the
<md:Extensions> element of a role element (one whose type is based on
Expand Down Expand Up @@ -97,6 +97,11 @@
<xsl:with-param name="e" select="mdui:Description"/>
</xsl:call-template>

<!-- unique xml:lang over Keywords elements -->
<xsl:call-template name="uniqueLang">
<xsl:with-param name="e" select="mdui:Keywords"/>
</xsl:call-template>

<!-- unique xml:lang over InformationURL elements -->
<xsl:call-template name="uniqueLang">
<xsl:with-param name="e" select="mdui:InformationURL"/>
Expand Down Expand Up @@ -141,9 +146,23 @@
</xsl:template>

<!--
Section 2.1.4 Element <mdui:Logo>
Section 2.1.4 Element <mdui:Keywords>
-->

<!--
Section 2.1.5 Element <mdui:Logo>
-->
<xsl:template match="mdui:Logo">
<!--
Require that the URL starts with https://
This is a SHOULD in the specification; we treat it as a MUST here.
-->
<xsl:if test="not(starts-with(., 'https://'))">
<xsl:call-template name="fatal">
<xsl:with-param name="m">mdui:Logo URL does not start with https://</xsl:with-param>
</xsl:call-template>
</xsl:if>
<!-- Schema validity: must have a height attribute -->
<xsl:if test="not(@height)">
<xsl:call-template name="fatal">
Expand All @@ -159,14 +178,14 @@
</xsl:template>

<!--
Section 2.1.5 Element <mdui:InformationURL>
Section 2.1.6 Element <mdui:InformationURL>
-->
<xsl:template match="mdui:InformationURL">
<xsl:call-template name="localisedNameType"/>
</xsl:template>

<!--
Section 2.1.6 Element <mdui:PrivacyStatementURL>
Section 2.1.7 Element <mdui:PrivacyStatementURL>
-->
<xsl:template match="mdui:PrivacyStatementURL">
<xsl:call-template name="localisedNameType"/>
Expand Down

0 comments on commit aaf5924

Please sign in to comment.