Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Check that mdui:InformationURL elements are valid URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Apr 21, 2014
1 parent 8d543b6 commit cbfe211
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mdx/_rules/check_mdui.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui"
xmlns:mdxURL="xalan://uk.ac.sdss.xalan.md.URLchecker"
xmlns:set="http://exslt.org/sets"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
Expand Down Expand Up @@ -190,6 +191,21 @@
</xsl:if>
</xsl:template>

<!--
Section 2.1.6 Element <mdui:InformationURL>
Require that the URL is valid.
-->
<xsl:template match="md:InformationURL[mdxURL:invalidURL(.)]">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:value-of select='local-name()'/>
<xsl:text> is not a valid URL: </xsl:text>
<xsl:value-of select="mdxURL:whyInvalid(.)"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

<!--
Section 2.2
Expand Down

0 comments on commit cbfe211

Please sign in to comment.