-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude support addresses from the metadata.
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
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,48 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| extract_addresses.xsl | ||
| XSL stylesheet that takes a SAML 2.0 metadata file and extracts | ||
| a list of contact e-mail addresses. Only administrative and | ||
| technical addresses are used; all others are dropped. | ||
| Author: Ian A. Young <ian@iay.org.uk> | ||
| $Id: extract_addresses.xsl,v 1.1 2006/07/31 14:42:41 iay Exp $ | ||
| --> | ||
| <xsl:stylesheet version="1.0" | ||
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
| xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
| xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0" | ||
| xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF" | ||
| exclude-result-prefixes="shibmeta md ds wayf"> | ||
|
|
||
| <!--Force UTF-8 encoding for the output.--> | ||
| <xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/> | ||
|
|
||
| <xsl:template match="/md:EntitiesDescriptor"> | ||
| <Addresses> | ||
| <xsl:apply-templates select="md:EntityDescriptor/md:ContactPerson"/> | ||
| </Addresses> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="md:ContactPerson[@contactType='support']"> | ||
| <!-- do nothing --> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="md:ContactPerson"> | ||
| <xsl:apply-templates select="md:EmailAddress"/> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="md:EmailAddress"> | ||
| <EmailAddress><xsl:value-of select="."/></EmailAddress> | ||
| </xsl:template> | ||
| <!--By default, copy text blocks, comments and attributes unchanged.--> | ||
| <xsl:template match="text()|@*"> | ||
| <xsl:copy/> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> |