eradicate old Yuan influence from China; the use of popular Mongol names, habits, language, and clothing were forbidden. The Yongle Emperor sponsored a mosque each in Nanjing and Xi'an; both survive. Repairs to mosques were encouraged and conversion to other uses was forbidden. He commissioned Grand Secretary Xie Jin to write the Yongle Encyclopedia, a compilation of Chinese civilization. It was completed in 1408 and was the world's largest general encyclopedia until being surpassed by Wikipedia in late 2007. Military campaigns Wars against the Mongols Mongol invaders were still causing many problems for the Ming Empire. The Yongle Emperor prepared to eliminate this threat. He mounted five military expeditions into the Mongol steppes and crushed the remnants of the Yuan dynasty that had fled north after being defeated by the Hongwu Emperor. He repaired the northern defences and forged buffer alliances to keep the Mongols at bay in order to build an army. His strategy was to force the Mongols into economic dependence on the Chinese and to launch periodic initiatives into Mongolia to cripple their offensive power. He attempted to compel Mongolia to become a Chinese tributary, with all the tribes submitting and proclaiming themselves vassals of the Ming Empire, and wanted to contain and isolate the Mongols. Through fighting, the Yongle Emperor learned to appreciate the importance of cavalry in battle and eventually began spending much of his resources to keep horses in good supply. The emperor spent his entire life fighting the Mongols. Failures and successes came and went, but after the emperor's second personal campaign against the Mongols, the Ming Empire was at peace for over seven years. Conquest of Vietnam Vietnam was a significant source of difficulties during the Yongle Emperor's reign. In 1406, the emperor responded to several formal petitions from members of the Trần dynasty, however on arrival to Vietnam, both the Trần prince and the accompanying Chinese ambassador were ambushed and killed. In response to this insult, the Yongle Emperor sent two armies led by Zhang Fu and Mu Sheng to conquer Vietnam. As the Trần royal family were all executed, Vietnam was integrated as a province of China, just as it had been up until 939. With the Hồ dynasty defeated in 1407, the Chinese began a serious and sustained effort to sinicise the population. The Yongle Emperor issued an order to Ming soldiers in Annam to all books except Buddhist