<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns:int="http://www.springframework.org/schema/integration"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd">

	<int:channel id="channelA">
		<int:queue/>
	</int:channel>

	<int:channel id="channelB">
		<int:queue/>
	</int:channel>

	<int:channel id="channelZ">
		<int:queue/>
	</int:channel>

	<int:transformer input-channel="xpathTransformerInput" output-channel="channelA"
					 expression="#xpath(payload, headers.xpath, @testNodeMapper)"/>

	<int:filter input-channel="xpathFilterInput" output-channel="channelA" discard-channel="channelZ"
			expression="#xpath(payload, '/name', 'boolean')"/>

	<int:splitter input-channel="xpathSplitterInput" output-channel="channelA"
			expression="#xpath(payload, '//book', 'document_list')"/>

	<int:router input-channel="xpathRouterInput"
				expression="#xpath(payload, '/name')"
				resolution-required="false"
				default-output-channel="channelZ">
		<int:mapping value="A" channel="channelA"/>
		<int:mapping value="B" channel="channelB"/>
	</int:router>

	<bean id="testNodeMapper" class="org.springframework.integration.xml.xpath.XPathTests$TestNodeMapper"/>

</beans>
