final XPath hint = XPath.newInstance( "//component[position()=1]/role-hint/text()" );
final XPath implementation = XPath.newInstance( "//component[position()=1]/implementation/text()" );
assertEquals( "role", ( (Text) role.selectSingleNode( doc ) ).getText() );
assertEquals( "hint", ( (Text) hint.selectSingleNode( doc ) ).getText() );
assertEquals( "impl", ( (Text) implementation.selectSingleNode( doc ) ).getText() );
final XPath role2 = XPath.newInstance( "//component[position()=2]/role/text()" );
final XPath hint2 = XPath.newInstance( "//component[position()=2]/role-hint/text()" );
final XPath implementation2 = XPath.newInstance( "//component[position()=2]/implementation/text()" );