Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Convert tabs to spaces in XML files so that 4-space convention is not…
… implicit See ukf/ukf-meta#134.
- Loading branch information
Showing
111 changed files
with
6,207 additions
and
6,207 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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
extract_entityids.xsl | ||
extract_entityids.xsl | ||
XSL stylesheet that takes a SAML 2.0 metadata file and extracts | ||
a list of entity IDs. | ||
XSL stylesheet that takes a SAML 2.0 metadata file and extracts | ||
a list of entity IDs. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
exclude-result-prefixes="md ds"> | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
exclude-result-prefixes="md ds"> | ||
|
||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
|
||
<xsl:template match="//md:EntityDescriptor"> | ||
<xsl:value-of select="@entityID"/> | ||
<xsl:text>
</xsl:text> | ||
</xsl:template> | ||
<xsl:template match="//md:EntityDescriptor"> | ||
<xsl:value-of select="@entityID"/> | ||
<xsl:text>
</xsl:text> | ||
</xsl:template> | ||
|
||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
</xsl:stylesheet> |
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
extract_member_dates.xsl | ||
extract_member_dates.xsl | ||
XSL stylesheet that takes the UK federation members.xml file ane extracts | ||
member names and joining dates in a format suitable for updating. | ||
XSL stylesheet that takes the UK federation members.xml file ane extracts | ||
member names and joining dates in a format suitable for updating. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:ukfm="http://ukfederation.org.uk/2007/01/members"> | ||
|
||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
|
||
<xsl:template match="ukfm:Member"> | ||
<xsl:value-of select="ukfm:JoinDate"/> | ||
<xsl:text>,"</xsl:text> | ||
<xsl:value-of select="md:OrganizationName"/> | ||
<xsl:text>"
</xsl:text> | ||
</xsl:template> | ||
|
||
<!-- | ||
Junk any extraneous text nodes. | ||
--> | ||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:ukfm="http://ukfederation.org.uk/2007/01/members"> | ||
|
||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
|
||
<xsl:template match="ukfm:Member"> | ||
<xsl:value-of select="ukfm:JoinDate"/> | ||
<xsl:text>,"</xsl:text> | ||
<xsl:value-of select="md:OrganizationName"/> | ||
<xsl:text>"
</xsl:text> | ||
</xsl:template> | ||
|
||
<!-- | ||
Junk any extraneous text nodes. | ||
--> | ||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
extract_saml2sp.xsl | ||
extract_saml2sp.xsl | ||
XSL stylesheet that takes a SAML 2.0 metadata aggregate and extracts | ||
SAML 2.0 support information for each SP entity. | ||
XSL stylesheet that takes a SAML 2.0 metadata aggregate and extracts | ||
SAML 2.0 support information for each SP entity. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
exclude-result-prefixes="md ds"> | ||
|
||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
|
||
<xsl:template match="//md:EntityDescriptor[md:SPSSODescriptor]"> | ||
<xsl:value-of select="@ID"/> | ||
<xsl:text> </xsl:text> | ||
<xsl:choose> | ||
<xsl:when test="contains(md:SPSSODescriptor/@protocolSupportEnumeration, | ||
'urn:oasis:names:tc:SAML:2.0:protocol')">yes</xsl:when> | ||
<xsl:otherwise>no</xsl:otherwise> | ||
</xsl:choose> | ||
<xsl:text>
</xsl:text> | ||
</xsl:template> | ||
|
||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
exclude-result-prefixes="md ds"> | ||
|
||
<!-- Output is plain text --> | ||
<xsl:output method="text"/> | ||
|
||
<xsl:template match="//md:EntityDescriptor[md:SPSSODescriptor]"> | ||
<xsl:value-of select="@ID"/> | ||
<xsl:text> </xsl:text> | ||
<xsl:choose> | ||
<xsl:when test="contains(md:SPSSODescriptor/@protocolSupportEnumeration, | ||
'urn:oasis:names:tc:SAML:2.0:protocol')">yes</xsl:when> | ||
<xsl:otherwise>no</xsl:otherwise> | ||
</xsl:choose> | ||
<xsl:text>
</xsl:text> | ||
</xsl:template> | ||
|
||
<xsl:template match="text()"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
identity.xsl | ||
identity.xsl | ||
Identity transform. | ||
Identity transform. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
|
||
<!-- | ||
Force UTF-8 encoding for the output. | ||
--> | ||
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8"/> | ||
|
||
<!--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> | ||
<!-- | ||
Force UTF-8 encoding for the output. | ||
--> | ||
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8"/> | ||
|
||
<!--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> |
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 |
---|---|---|
@@ -1,78 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
members_domains.xsl | ||
members_domains.xsl | ||
Update members.xml to use Domain and PrimaryScope instead of | ||
Scopes and isPrimary. | ||
Update members.xml to use Domain and PrimaryScope instead of | ||
Scopes and isPrimary. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:members="http://ukfederation.org.uk/2007/01/members" | ||
xmlns:xalan="http://xml.apache.org/xalan" | ||
xmlns:members="http://ukfederation.org.uk/2007/01/members" | ||
xmlns:xalan="http://xml.apache.org/xalan" | ||
|
||
exclude-result-prefixes="members xalan" | ||
xmlns="http://ukfederation.org.uk/2007/01/members" | ||
> | ||
exclude-result-prefixes="members xalan" | ||
xmlns="http://ukfederation.org.uk/2007/01/members" | ||
> | ||
|
||
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" | ||
indent="yes" xalan:indent-amount="4" | ||
/> | ||
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" | ||
indent="yes" xalan:indent-amount="4" | ||
/> | ||
|
||
<!-- | ||
If a Scopes element has an isPrimary Scope, extract that | ||
as the domain and primary scope for the member. | ||
<!-- | ||
If a Scopes element has an isPrimary Scope, extract that | ||
as the domain and primary scope for the member. | ||
The result may not be schema-valid if the Scopes element is not | ||
the first one belonging to the member: duplicate Domains elements | ||
need to be removed, and misplaced Domains elements may need | ||
to be moved around manually. | ||
--> | ||
<xsl:template match="members:Scopes[members:Scope/@isPrimary='true']"> | ||
<xsl:variable name="prdom" select="members:Scope[@isPrimary='true']"/> | ||
<xsl:element name="Domains"> | ||
<xsl:text> </xsl:text> | ||
<xsl:element name="Domain"><xsl:value-of select="$prdom"/></xsl:element> | ||
<xsl:text> </xsl:text> | ||
</xsl:element> | ||
<xsl:text> </xsl:text> | ||
<xsl:element name="PrimaryScope"><xsl:value-of select="$prdom"/></xsl:element> | ||
<!-- | ||
Delete the Scopes element entirely if: | ||
* it contains only one Scope, and | ||
* it contains no Entity elements | ||
The result may not be schema-valid if the Scopes element is not | ||
the first one belonging to the member: duplicate Domains elements | ||
need to be removed, and misplaced Domains elements may need | ||
to be moved around manually. | ||
--> | ||
<xsl:template match="members:Scopes[members:Scope/@isPrimary='true']"> | ||
<xsl:variable name="prdom" select="members:Scope[@isPrimary='true']"/> | ||
<xsl:element name="Domains"> | ||
<xsl:text> </xsl:text> | ||
<xsl:element name="Domain"><xsl:value-of select="$prdom"/></xsl:element> | ||
<xsl:text> </xsl:text> | ||
</xsl:element> | ||
<xsl:text> </xsl:text> | ||
<xsl:element name="PrimaryScope"><xsl:value-of select="$prdom"/></xsl:element> | ||
<!-- | ||
Delete the Scopes element entirely if: | ||
* it contains only one Scope, and | ||
* it contains no Entity elements | ||
In other words, retain it if: | ||
* it contains more than one Scope, or | ||
* it contains any Entity elements | ||
--> | ||
<xsl:if test="count(members:Scope)>1 or count(members:Entity)!=0"> | ||
<xsl:text> </xsl:text> | ||
<xsl:copy> | ||
<xsl:apply-templates/> | ||
</xsl:copy> | ||
</xsl:if> | ||
</xsl:template> | ||
In other words, retain it if: | ||
* it contains more than one Scope, or | ||
* it contains any Entity elements | ||
--> | ||
<xsl:if test="count(members:Scope)>1 or count(members:Entity)!=0"> | ||
<xsl:text> </xsl:text> | ||
<xsl:copy> | ||
<xsl:apply-templates/> | ||
</xsl:copy> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<!-- | ||
Remove any remaining isPrimary attributes. | ||
--> | ||
<xsl:template match="@isPrimary"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
<!-- | ||
Remove any remaining isPrimary attributes. | ||
--> | ||
<xsl:template match="@isPrimary"> | ||
<!-- 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 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> | ||
<!--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> |
Oops, something went wrong.