code: def leaf(self, parent, parts):
          
          name = splitPrefix(parts[-1])[1]
          if name.startswith('@'):
              result, path = parent.get_attribute(name[1:])
          else:
              result, ancestry = parent.get_child(name)
          if result is None:
              raise PathResolver.BadPath(name)
          return result
docs: Find the leaf.
          @param parts: A list of path parts.
          @type parts: [str,..]
          @param parent: The leaf's parent.
          @type parent: L{xsd.sxbase.SchemaObject}
          @return: The leaf.
          @rtype: L{xsd.sxbase.SchemaObject}