-
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.
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| master_to_wayf.xsl | ||
| XSL stylesheet that takes a SAML 2.0 metadata file and filters out | ||
| entities marked as hidden from the WAYF. | ||
| Author: Ian A. Young <ian@iay.org.uk> | ||
| $Id: master_to_wayf.xsl,v 1.1 2006/06/23 09:05:00 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" | ||
| xmlns="urn:oasis:names:tc:SAML:2.0:metadata" | ||
| exclude-result-prefixes="shibmeta md ds wayf"> | ||
|
|
||
| <!-- | ||
| Version information for this file. Remember to peel off the dollar signs | ||
| before dropping the text into another versioned file. | ||
| --> | ||
| <xsl:param name="cvsId">$Id: master_to_wayf.xsl,v 1.1 2006/06/23 09:05:00 iay Exp $</xsl:param> | ||
|
|
||
| <!-- | ||
| Add a comment to the start of the output file. | ||
| --> | ||
| <xsl:template match="/"> | ||
| <xsl:comment> | ||
| <xsl:text> 	***DO NOT EDIT THIS FILE*** </xsl:text> | ||
| <xsl:text>	Converted by: 	</xsl:text> | ||
| <xsl:value-of select="substring-before(substring-after($cvsId, ': '), '$')"/> | ||
| <xsl:text> </xsl:text> | ||
| </xsl:comment> | ||
| <xsl:apply-templates/> | ||
| </xsl:template> | ||
|
|
||
| <!--Force UTF-8 encoding for the output.--> | ||
| <xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/> | ||
|
|
||
| <!-- | ||
| The WAYF does not need the key authority information for the federation. | ||
| We assume, for now, that this is the only extension on the EntitiesDescriptor | ||
| and just omit that entirely. If we ever start putting other extensions in at | ||
| that level, this would need to be revised. | ||
| --> | ||
| <xsl:template match="md:EntitiesDescriptor/md:Extensions"> | ||
| <!-- do nothing --> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Any entity which has an entity-level extension element wayf:HideFromWAYF | ||
| is omitted from the output. | ||
| --> | ||
| <xsl:template match="md:EntityDescriptor[md:Extensions/wayf:HideFromWAYF]"> | ||
| <!-- do nothing --> | ||
| </xsl:template> | ||
|
|
||
| <!--By default, copy text blocks, comments and attributes unchanged.--> | ||
| <xsl:template match="text()|comment()|@*"> | ||
| <xsl:copy/> | ||
| </xsl:template> | ||
|
|
||
| <!--By default, copy all elements from the input to the output, along with their attributes and contents.--> | ||
| <xsl:template match="*"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="node()|@*"/> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> |