Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Use EntityAttributeAddingStage for hide from discovery.
Browse files Browse the repository at this point in the history
The old XSLT-based translation from wayf:HideFromWAYF to the new hide-from-discovery category didn't interact properly with explicit entity attributes present in the fragment files. Fix this by using EntityAttributeAddingStage instead.
  • Loading branch information
iay committed Jan 26, 2015
1 parent 59211f7 commit e15b040
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 71 deletions.
66 changes: 0 additions & 66 deletions mdx/uk/add_hide_category.xsl

This file was deleted.

42 changes: 37 additions & 5 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,44 @@
Add REFEDS Hide from Discovery category as a standardised
equivalent to our HideFromWAYF element.
-->
<bean p:id="uk_addHideFromDiscovery" parent="XSLTransformationStage">
<property name="XSLResource">
<bean parent="ClassPathResource">
<constructor-arg value="uk/add_hide_category.xsl"/>
<bean p:id="uk_addHideFromDiscovery" parent="SplitMergeStage">
<!-- select entities with HideFromWayf label -->
<property name="selectionStrategy">
<bean parent="XPathItemSelectionStrategy">
<constructor-arg value="/md:EntityDescriptor[md:Extensions/wayf:HideFromWAYF]"/>
<constructor-arg ref="commonNamespaces"/>
</bean>
</property>
</property>

<!--
Pipeline for selected items.
-->
<property name="selectedItemPipeline">
<bean p:id="selectedItemPipeline" parent="SimplePipeline">
<property name="stages">
<bean p:id="addHideFromDiscovery" parent="EntityAttributeAddingStage"
p:attributeValue="http://refeds.org/category/hide-from-discovery"
p:addingFirstChild="true"/>
</property>
</bean>
</property>

<!--
Pipeline for unselected items.
This is only required because of MDA-140, and can be removed when
we move to MDA 0.9.0.
-->
<property name="nonselectedItemPipeline">
<bean p:id="nonselectedItemPipeline" parent="SimplePipeline">
<property name="stages">
<list>
<!-- nothing required -->
</list>
</property>
</bean>
</property>

</bean>

<ref bean="checkSchemas"/>
Expand Down

0 comments on commit e15b040

Please sign in to comment.