This repository has been archived by the owner. It is now read-only.
forked from InCommon/inc-meta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that ukfedlabel elements appear at most once per entity
Resolves ukf/ukf-meta#42.
- Loading branch information
Showing
3 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| check_ukfedlabel.xsl | ||
| Checking ruleset for the ukfedlabel namespace. | ||
| --> | ||
| <xsl:stylesheet version="1.0" | ||
| xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
| xmlns:ukfedlabel="http://ukfederation.org.uk/2006/11/label" | ||
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
|
|
||
| xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> | ||
|
|
||
| <!-- | ||
| Common support functions. | ||
| --> | ||
| <xsl:import href="../_rules/check_framework.xsl"/> | ||
|
|
||
|
|
||
| <!-- | ||
| Check for individual elements appearing more than once in | ||
| a single entity. | ||
| --> | ||
| <xsl:template match="md:EntityDescriptor[count(descendant::ukfedlabel:AccountableUsers)>1]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity must not have more than one ukfedlabel:AccountableUsers element</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
| <xsl:template match="md:EntityDescriptor[count(descendant::ukfedlabel:ExportOptIn)>1]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity must not have more than one ukfedlabel:ExportOptIn element</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
| <xsl:template match="md:EntityDescriptor[count(descendant::ukfedlabel:ExportOptOut)>1]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity must not have more than one ukfedlabel:ExportOptOut element</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
| <xsl:template match="md:EntityDescriptor[count(descendant::ukfedlabel:Software)>1]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity must not have more than one ukfedlabel:Software element</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
| <xsl:template match="md:EntityDescriptor[count(descendant::ukfedlabel:UKFederationMember)>1]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity must not have more than one ukfedlabel:UKFederationMember element</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
|
|
||
| <!-- | ||
| Check for entities which are both opted in to and opted out from export. | ||
| --> | ||
| <xsl:template match="md:EntityDescriptor/md:Extensions[ukfedlabel:ExportOptIn][ukfedlabel:ExportOptOut]"> | ||
| <xsl:call-template name="error"> | ||
| <xsl:with-param name="m"> | ||
| <xsl:text>entity cannot be both opted in to and opted out from export</xsl:text> | ||
| </xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters