<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.ascc.net/xml/schematron">

     <ns uri="http://www.example.org" prefix="ex"/>
     <ns uri="http://www.chinese.org" prefix="ch"/>
     <ns uri="http://www.book.org" prefix="bk"/>

     <pattern name="checkTaxonomyPayloadMatch">

         <rule context="ex:Document[ex:What/@taxonomy='http://www.dmoz.org/World/Language/Chinese/']">
             <assert test="ex:Payload/*[namespace-uri()='http://www.chinese.org']">
                 When taxonomy is http://www.dmoz.org/World/Language/Chinese/ the Payload should contain 
                 content from the http://www.chinese.org namespace
             </assert>
         </rule>

         <rule context="ex:Document[ex:What/@taxonomy='http://www.dmoz.org/Society/Book/Philosophy/']">
             <assert test="ex:Payload/*[namespace-uri()='http://www.book.org']">
                 When taxonomy is http://www.dmoz.org/Society/Book/Philosophy/ the Payload should contain 
                 content from the http://www.book.org namespace
             </assert>
         </rule>
     </pattern>

</schema>