Fix of Issue 8308

   - implemented the conditional parsing capabilities
   - attached few junit test cases to test it