Skip to content

Commit

Permalink
Add utility to extract a list of members and their joining dates (if …
Browse files Browse the repository at this point in the history
…known).
  • Loading branch information
iay committed May 15, 2008
1 parent ea3d227 commit ae42fc7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,17 @@
x="extract_authorities.xsl"/>
</target>

<!--
Extract member list for joining date backfill.
-->
<target name="extract.member.dates">
<echo>Extracting member dates</echo>
<XALAN
i="members.xml"
o="member-dates.txt"
x="extract_member_dates.xsl"/>
</target>

<!--
Extract embedded certificates
-->
Expand Down
34 changes: 34 additions & 0 deletions build/extract_member_dates.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
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>"&#x0a;</xsl:text>
</xsl:template>

<!--
Junk any extraneous text nodes.
-->
<xsl:template match="text()">
<!-- do nothing -->
</xsl:template>

</xsl:stylesheet>

0 comments on commit ae42fc7

Please sign in to comment.