Skip to content

Commit

Permalink
Apply new namespace normalisation process to the production, WAYF and…
Browse files Browse the repository at this point in the history
… export aggregates.
  • Loading branch information
iay committed May 17, 2011
1 parent 69798d3 commit 2ad711f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 97 deletions.
22 changes: 18 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,15 @@

<!-- [19] -->
<echo> Production aggregate...</echo>
<XALAN.xmldir x="uk_master_unsigned.xsl" i="${uk.master.file}"
o="${md.prod.unsigned}" />
<XALAN
x="${build.dir}/uk_master_unsigned.xsl"
i="${xml.dir}/${uk.master.file}"
o="${temp.xml}"/>
<echo> normalising namespaces...</echo>
<XALAN
x="${build.dir}/ns_norm_uk.xsl"
i="${temp.xml}"
o="${xml.dir}/${md.prod.unsigned}" />
<MDNORM i="${md.prod.unsigned}"/>
<CHECK.publishable i="${xml.dir}/${md.prod.unsigned}"/>
<!-- [25] -->
Expand All @@ -472,8 +479,15 @@

<!-- [29] -->
<echo> Export aggregate...</echo>
<XALAN.xmldir x="uk_master_export.xsl" i="${uk.master.file}"
o="${md.export.unsigned}" />
<XALAN
x="${build.dir}/uk_master_export.xsl"
i="${xml.dir}/${uk.master.file}"
o="${temp.xml}"/>
<echo> normalising namespaces...</echo>
<XALAN
x="${build.dir}/ns_norm_uk.xsl"
i="${temp.xml}"
o="${xml.dir}/${md.export.unsigned}" />
<MDNORM i="${md.export.unsigned}"/>

<!-- [31] -->
Expand Down
50 changes: 4 additions & 46 deletions build/uk_master_export.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,13 @@
</xsl:template>

<!--
Normalise and pass through certain ukfedlabel namespace elements.
Pass through certain ukfedlabel namespace elements.
-->

<xsl:template match="ukfedlabel:UKFederationMember">
<xsl:element name="ukfedlabel:UKFederationMember">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>

<xsl:template match="ukfedlabel:AccountableUsers">
<xsl:element name="ukfedlabel:AccountableUsers">
<xsl:template match="ukfedlabel:UKFederationMember | ukfedlabel:AccountableUsers">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:copy>
</xsl:template>

<!--
Expand All @@ -185,42 +179,6 @@
<!-- do nothing -->
</xsl:template>

<!--
Normalise namespace on IdP discovery elements.
-->

<xsl:template match="idpdisc:DiscoveryResponse">
<idpdisc:DiscoveryResponse>
<xsl:apply-templates select="node()|@*"/>
</idpdisc:DiscoveryResponse>
</xsl:template>

<!--
Normalise namespace on Athens PUID elements.
-->

<xsl:template match="elab:AthensPUIDAuthority">
<elab:AthensPUIDAuthority>
<xsl:apply-templates select="node()|@*"/>
</elab:AthensPUIDAuthority>
</xsl:template>

<!--
Normalise namespace on Shibboleth metadata elements.
-->

<xsl:template match="shibmd:Scope">
<shibmd:Scope>
<xsl:apply-templates select="node()|@*"/>
</shibmd:Scope>
</xsl:template>

<xsl:template match="shibmd:KeyAuthority">
<shibmd:KeyAuthority>
<xsl:apply-templates select="node()|@*"/>
</shibmd:KeyAuthority>
</xsl:template>

<!--
Remove administrative contacts.
-->
Expand Down
52 changes: 5 additions & 47 deletions build/uk_master_unsigned.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -150,64 +150,22 @@


<!--
Normalise and pass through certain ukfedlabel namespace elements.
Pass through certain ukfedlabel namespace elements.
-->

<xsl:template match="ukfedlabel:UKFederationMember">
<xsl:element name="ukfedlabel:UKFederationMember">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>

<xsl:template match="ukfedlabel:AccountableUsers">
<xsl:element name="ukfedlabel:AccountableUsers">
<xsl:template match="ukfedlabel:UKFederationMember | ukfedlabel:AccountableUsers">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:copy>
</xsl:template>

<!--
Strip all other ukfedlabel namespace elements entirely.
-->
<xsl:template match="ukfedlabel:*">
<!-- do nothing -->
</xsl:template>

<!--
Normalise namespace on IdP discovery elements.
-->

<xsl:template match="idpdisc:DiscoveryResponse">
<idpdisc:DiscoveryResponse>
<xsl:apply-templates select="node()|@*"/>
</idpdisc:DiscoveryResponse>
</xsl:template>

<!--
Normalise namespace on Athens PUID elements.
-->

<xsl:template match="elab:AthensPUIDAuthority">
<elab:AthensPUIDAuthority>
<xsl:apply-templates select="node()|@*"/>
</elab:AthensPUIDAuthority>
</xsl:template>

<!--
Normalise namespace on Shibboleth metadata elements.
-->

<xsl:template match="shibmd:Scope">
<shibmd:Scope>
<xsl:apply-templates select="node()|@*"/>
</shibmd:Scope>
</xsl:template>

<xsl:template match="shibmd:KeyAuthority">
<shibmd:KeyAuthority>
<xsl:apply-templates select="node()|@*"/>
</shibmd:KeyAuthority>
</xsl:template>

<!--
Remove administrative contacts.
-->
Expand Down

0 comments on commit 2ad711f

Please sign in to comment.