Skip to content

Commit

Permalink
An XSLT transform that extracts the entity IDs from a metadata file.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Apr 12, 2011
1 parent c83ef18 commit bce255e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions attic/extract_entityids.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
extract_entityids.xsl
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>
-->
<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"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
exclude-result-prefixes="md ds wayf">

<!-- Output is plain text -->
<xsl:output method="text"/>

<xsl:template match="//md:EntityDescriptor">
<xsl:value-of select="@entityID"/>
<xsl:text>&#x0a;</xsl:text>
</xsl:template>

<xsl:template match="text()">
<!-- do nothing -->
</xsl:template>
</xsl:stylesheet>

0 comments on commit bce255e

Please sign in to comment.