Skip to content

Commit

Permalink
Move generation of the leading comment in metadata files downstream s…
Browse files Browse the repository at this point in the history
…o that each stream can have a different comment in it.
  • Loading branch information
iay committed Dec 17, 2008
1 parent a99a480 commit 63f9ca2
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 18 deletions.
19 changes: 1 addition & 18 deletions build/master_ukfederation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
master_ukfederation.xsl
XSL stylesheet that takes a SAML 2.0 metadata master file containing
a trust fabric and optional entities, and makes a UK Federation
a trust fabric and optional entities, and makes a UK federation
master file by tweaking appropriately and inserting the combined
entities file. The entities from the combined entities file are
also transformed in various ways here.
Expand All @@ -21,26 +21,9 @@
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:uklabel="http://ukfederation.org.uk/2006/11/label"
xmlns:members="http://ukfederation.org.uk/2007/01/members"
xmlns:date="http://exslt.org/dates-and-times"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf members">

<xsl:variable name="now" select="date:date-time()"/>

<!--
Add a comment to the start of the output file.
-->
<xsl:template match="/">
<xsl:comment>
<xsl:text>&#10;&#9;U K F E D E R A T I O N M E T A D A T A&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;Aggregate built </xsl:text>
<xsl:value-of select="$now"/>
<xsl:text>&#10;</xsl:text>
</xsl:comment>
<xsl:apply-templates/>
</xsl:template>

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

Expand Down
19 changes: 19 additions & 0 deletions build/uk_master_export.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,31 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:uklabel="http://ukfederation.org.uk/2006/11/label"
xmlns:date="http://exslt.org/dates-and-times"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

<xsl:variable name="now" select="date:date-time()"/>

<!--
Add a comment to the start of the output file.
-->
<xsl:template match="/">
<xsl:comment>
<xsl:text>&#10;&#9;U K F E D E R A T I O N M E T A D A T A&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;*** Prototype export metadata; not for production use ***&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;Aggregate built </xsl:text>
<xsl:value-of select="$now"/>
<xsl:text>&#10;</xsl:text>
</xsl:comment>
<xsl:apply-templates/>
</xsl:template>

<!--
Strip uklabel:Software elements entirely.
-->
Expand Down
19 changes: 19 additions & 0 deletions build/uk_master_test.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,31 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:uklabel="http://ukfederation.org.uk/2006/11/label"
xmlns:date="http://exslt.org/dates-and-times"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

<xsl:variable name="now" select="date:date-time()"/>

<!--
Add a comment to the start of the output file.
-->
<xsl:template match="/">
<xsl:comment>
<xsl:text>&#10;&#9;U K F E D E R A T I O N M E T A D A T A&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;*** Feature test metadata; not for production use ***&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;Aggregate built </xsl:text>
<xsl:value-of select="$now"/>
<xsl:text>&#10;</xsl:text>
</xsl:comment>
<xsl:apply-templates/>
</xsl:template>

<!--
Strip uklabel:Software elements entirely.
-->
Expand Down
17 changes: 17 additions & 0 deletions build/uk_master_unsigned.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,29 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:uklabel="http://ukfederation.org.uk/2006/11/label"
xmlns:date="http://exslt.org/dates-and-times"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

<xsl:variable name="now" select="date:date-time()"/>

<!--
Add a comment to the start of the output file.
-->
<xsl:template match="/">
<xsl:comment>
<xsl:text>&#10;&#9;U K F E D E R A T I O N M E T A D A T A&#10;</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#9;Aggregate built </xsl:text>
<xsl:value-of select="$now"/>
<xsl:text>&#10;</xsl:text>
</xsl:comment>
<xsl:apply-templates/>
</xsl:template>

<!--
Strip uklabel:Software elements entirely.
-->
Expand Down

0 comments on commit 63f9ca2

Please sign in to comment.