<schema xmlns="http://www.ascc.net/xml/schematron" >
     <pattern name="a child of selected elements">
          <rule context="CCC">
               <assert test="parent::*[name()='BBB' or name()='DDD']">Element CCC must not be a child of element
                    <name path="parent::*"/>
               </assert>
          </rule>
     </pattern>
</schema>

