diff options
Diffstat (limited to 'xslt/normalize.xsl')
-rw-r--r-- | xslt/normalize.xsl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/xslt/normalize.xsl b/xslt/normalize.xsl index 9ac9cc61..f48f4877 100644 --- a/xslt/normalize.xsl +++ b/xslt/normalize.xsl @@ -41,6 +41,9 @@ If You do not accept these Terms, then You must not continue to use this Metadat </xsl:if> <xsl:apply-templates/> </md:EntitiesDescriptor> + <xsl:if test="$target='true'"> + <md:Extensions><xsl:call-template name="add-swamid-pi"/></md:Extensions> + </xsl:if> </xsl:template> <xsl:template match="md:EntityDescriptor"> @@ -62,7 +65,7 @@ If You do not accept these Terms, then You must not continue to use this Metadat <md:EntityDescriptor> <xsl:apply-templates select="@*"/> <xsl:if test="$rpi='true' and not(md:Extensions)"> - <md:Extensions><xsl:call-template name="add-swamid-rpi"/></md:Extensions> + <md:Extensions><xsl:call-template name="add-swamid-ri"/></md:Extensions> </xsl:if> <xsl:apply-templates select="text()|comment()|md:Extensions|md:RoleDescriptor|md:IDPSSODescriptor|md:SPSSODescriptor|md:AuthnAuthorityDescriptor|md:AttributeAuthorityDescriptor|md:PDPDescriptor|md:AffiliationDescriptor"/> <xsl:if test="$org='true' and not(md:Organization)"> @@ -79,12 +82,12 @@ If You do not accept these Terms, then You must not continue to use this Metadat <xsl:template match="md:EntityDescriptor/md:Extensions"> <md:Extensions> - <xsl:call-template name="add-swamid-rpi"/> + <xsl:call-template name="add-swamid-ri"/> <xsl:apply-templates select="text()|comment()|node()"/> </md:Extensions> </xsl:template> - <xsl:template name="add-swamid-rpi"> + <xsl:template name="add-swamid-ri"> <xsl:if test="$rpi='true' and not(mdrpi:RegistrationInfo[@registrationAuthority='http://swamid.se/'])"> <mdrpi:RegistrationInfo registrationAuthority="http://www.swamid.se/"> <mdrpi:RegistrationPolicy xml:lang="en">http://www.swamid.se/download/18.248ad5af12aa8136533800012293/SWAMID+Metadata+Registration+Practice+Statement-20110714.pdf</mdrpi:RegistrationPolicy> @@ -92,6 +95,14 @@ If You do not accept these Terms, then You must not continue to use this Metadat </xsl:if> </xsl:template> + <xsl:template name="add-swamid-pi"> + <mdrpi:PublicationInfo> + <xsl:attribute Name="creationInstant"><xsl:value-of select="$now"/></xsl:attribute> + <xsl:attribute Name="publisher"><xsl:value-of select="$target"/></xsl:attribute> + <mdrpi:UsagePolicy xml:lang="en">https://www.sunet.se/wp-content/uploads/2015/12/SWAMID-Terms-of-Use-20110714.pdf</mdrpi:UsagePolicy> + </mdrpi:PublicationInfo> + </xsl:template> + <xsl:template match="@xml:base|@ID|@validUntil|@cacheDuration"/> <xsl:template match="text()|comment()|@*"> |