summaryrefslogtreecommitdiff
path: root/metadata/xslt/extract-idp.xslt
blob: 4858876f2529087d278b24530a9ef15303964ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
                xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
                xmlns:exsl="http://exslt.org/common"
                extension-element-prefixes="exsl"
                xmlns:xi="http://www.w3.org/2001/XInclude"
                xmlns:shibmd="urn:mace:shibboleth:metadata:1.0">

  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>

  <xsl:template match="/md:EntitiesDescriptor">
  <md:EntitiesDescriptor>
    <xsl:apply-templates select="md:EntityDescriptor[md:IDPSSODescriptor]|md:EntityDescriptor[md:AttributeAuthorityDescriptor]"/>
  </md:EntitiesDescriptor>
  </xsl:template>

  <xsl:template match="md:EntityDescriptor">
     <xi:include><xsl:attribute name="href"><xsl:value-of select="@xml:base"/></xsl:attribute></xi:include>
  </xsl:template>

</xsl:stylesheet>