void () { String source = "<ul><li>one</li></ul><li>two</li><li>three</li>"; String pattern1 = "[within( \"<ul>'content*</ul>\" )]<'li />"; assertEquals("within predicate", 1, findMatchesCount(source, pattern1, XmlFileType.INSTANCE)); String pattern1a = "[within( \"<ul>'_content*</ul>\" )]<'li />"; assertEquals("within predicate", 1, findMatchesCount(source, pattern1a, XmlFileType.INSTANCE)); String pattern2 = "[!within( \"<ul>'content*</ul>\" )]<'li />"; assertEquals("not within predicate", 3, findMatchesCount(source, pattern2, XmlFileType.INSTANCE)); String pattern2a = "[!within( \"<ul>'_content*</ul>\" )]<'li />"; assertEquals("not within predicate", 3, findMatchesCount(source, pattern2a, XmlFileType.INSTANCE)); }