Matching Partial Templates