-
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.
New fragment-based metadata generation system.
- Loading branch information
Showing
2 changed files
with
172 additions
and
25 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,79 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| master_sdss.xsl | ||
| XSL stylesheet that takes a SAML 2.0 metadata master file containing | ||
| a trust fabric and optional entities, and makes an SDSS federation | ||
| master file by tweaking appropriately and inserting the combined | ||
| entities file. | ||
| Author: Ian A. Young <ian@iay.org.uk> | ||
| $Id: master_sdss.xsl,v 1.1 2006/09/14 11:03: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="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_sdss.xsl,v 1.1 2006/09/14 11:03: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>	Generated 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"/> | ||
|
|
||
| <!-- | ||
| Root EntitiesDescriptor element. | ||
| Copy all attributes and nested elements to the output, then | ||
| insert the entities from the entities file at the end. | ||
| --> | ||
| <xsl:template match="/md:EntitiesDescriptor"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="node()|@*"/> | ||
| <xsl:apply-templates select="document('../xml/entities.xml')/*/md:EntityDescriptor"/> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Drop any explicit xsi:schemaLocation attributes from imported entity fragments. | ||
| --> | ||
| <xsl:template match="@xsi:schemaLocation[parent::md:EntityDescriptor]"> | ||
| <!-- 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> |