How can a VTP domain name be learned?
I believe switch can learn the vtp domain if the vtp domain name was at factory defaults, out of a vtp doc.
By default, the switch is in VTP server mode and is in the no-management domain state until the switch receives an advertisement for a domain over a trunk link or you configure a management domain. You cannot create or modify VLANs on a VTP server until the management domain name is specified or learned.
If the switch receives a VTP advertisement over a trunk link, it inherits the management domain name and the VTP configuration revision number. The switch remains in the first management domain learned unless changed by the user.