Armed separatists attacked a train in Pakistan, taking hostages and claiming to control the situation, raising fears of a prolonged standoff and violence.