A schematic model for fragmentation and phase transition in nuclear collisions