There is a large group of writings with the title Xiangmajing 相馬經 or Xiangmashu 相馬書 "Book of inspection or assessment of horses" or Majing 馬經 "Classic of horses". While older texts were specialized on the assessment of the quality of horses, later texts are of a medical nature and can be called the oldest Chinese texts on veterinary medicine.
The book Lüshi chunqiu 呂氏春秋 (ch. Guanbiao 觀表) shortly describes how the diviner Han Feng 寒風 used to inspect the teeth of the beasts, Ma Chao 麻朝 the cheeks, Zinü Li 子女厲 the eyes, Wei Ji 衛忌 the moustache, Xu Bin 許鄙 the buttocks, Tou Fahe 投伐褐 the breast and flanks, Guan Qing 管青 the parts of the animal used for broth, Chen Bei 陳悲 the limbs and feet, Qin Ya 秦牙 the front, and Zan Jun 贊君 the back of horses. The book Huainanzi 淮南子 (ch. Qisu 齊俗) also says that the masters Bo Le 伯樂, Han Feng 韓風, Qin Ya 秦牙 and Guan Qing 管青 laid their focus of assessment on different parts of the body. In the collective biography of the "Soothsayers" (127 Rizhe liezhuan 日者列傳) in the universal history Shiji 史記 it is told that the horse assessor Huang Zhi 黃直 was a man, and Chen Junfu 陳君夫 a (his?) wife. Horse auditing is also mentioned in the Daoist book Zhuangzi 莊子 (ch. Xu Wugui 徐無鬼).
In 1972, excavation at the now the famous Han-period 漢 (206 BCE-220 CE) tomb of Mawangdui 馬王堆 near Changsha 長沙, Hunan, brought to light a tomb library that also included a text on horse inspection. It is known to scholars as Mawangdui Xiangmajing 馬王堆相馬經 or Boshu Xiangmiajing 帛書相馬經. The text perhaps originates in south China, the regional state of Chu. The text is written in a question-and-answer pattern and belongs to the literary genre of descriptive prose-poetry or “rhapsodies” (fu).
A commentary on the biography of Xiahou Xuan 夏侯玄 (208-254) in the history book Sanguozhi 三國志 says that there was a text called Majing 馬經 during the Han period. A book with the title Xiangmajing is quoted in the commentary on Zhang Jingyang's 張景陽 (d. 307) text Qiming 七命 in the anthology Wenxuan 文選.
The agricultural treatise Qimin yaoshu 齊民要術 includes a relatively long chapter (ch. 56) about horse inspection which might be quoted from a book entitled Xiangmajing.
The oldest bibliographical reference of a book on animal inspection is the text Xiangliuchu 相六畜 "Inspection of the six domestic animals", with a length of 36 juan, mentioned in the imperial bibliography Yiwen zhi 藝文志 in the official dynastic history Hanshu 漢書, but it is not to be found any more in later bibliographies. The imperial bibliography Jingji zhi 經籍志 in the history book Suishu 隋書 lists a book called Bo Le Xiangmajing 伯樂相馬經, but it cannot be substantiated that this book was identical to the text quoted in the Qimin yaoshu.
Bo Le's Xiangmajing is included in a long list presenting texts on the inspection of various domestic animals as listed in Liang-period 梁 (502-557) catalogues. They include Que Zhong tongmafa 闕中銅馬法 (perhaps describing brass models for training inspectional methods), Bamatu 八馬圖 allegedly written by King Mu of Zhou 周穆王 (10th cent. BCE), Ning Qi's 甯戚 Xiangniujing 相牛經(water buffaloes), Wang Liang's 王良 Xiangniujing, Gaotang Long's 高堂隆 Xiangniujing, Huainan ba gong xianggejing 淮南八公相鵠經 (dove inspection by the eight masters of Huainan), Fuqiu Gong's 浮丘公 Xiangheshu 相鶴書 (cranes), and the anonymous texts Xiangyajing 相鴨經 (ducks), Xiangjijing 相雞經 (chicken), Xiang'ejing 相鵝經 (geese), and Xiangbeijing 相貝經 (shells and conches). Most of these texts were soon lost. The text attributed to King Mu is also mentioned in the book catalogue Chongwen zongmu 崇文總目 from the early Song-period 宋 (960-1279). Apart from Bo Le's Xiangmajing, a 60-juan-long Xiangmajing written by Zhuge Ying 諸葛潁 (539-615) is included in the bibliography of the history book Jiutangshu 舊唐書 (ch. 46-47).
While the Suishu catalogue, compiled during the early Tang period 唐 (618-907), classifies all xiangma texts as belonging to the field of the Five Agents (wuxing lei 五行類) theory which stipulated to search for extraordinary phenomena and relate them to cosmological changes, post-Tang book catalogues clearly classify them as agricultural treatises (nongjia 農家), i.e. books giving recommendations for animal breeding.
In the bibliographies of the Jiutangshu and Xintangshu 新唐志 (ch. 57-60), one more Xiangmajing text is listed whose author is called Xu Cheng 徐成. According to the Song-period encyclopaedia Taiping yulan 太平御覽, which quotes from the Bo Le Xiangmajing, it can be learnt that Xu Cheng, courtesy name Zichang 子長, who was "overseer of the fords of the Rivers Huai and Jiang" (Jiang Huai jin du 江淮津督), and his brother were retainers of a fu jun 府君 "lord of the prefecture" (?), to whom they served as horse diviners, probably during the Tang period.
The series Shuofu 說郛 quotes the text of a book Xiangmajing, written by Xu Xian 徐咸, who might be identical with Xu Cheng. The text includes ten short chapters, partially with illustrations of the hair and feet of the inspected beasts, and other parts used for divination, and partially consisting of poems, songs that serve as an aide-mémoire for divination methods. The last three of these chapters are lost. In how fare these transmitted passages correspond to older texts, is a question not solved yet. Part of these fragments is also quoted in books on equine medicine like Yuan-Heng liaoma ji 元亨療馬集. An extension of the Shuofu called Guang shuofu 廣說郛 is described in the early Qing-period 清 (1644-1911) bibliography Qianqingtang shumu 千頃堂書目 and included a book called Xiangmajing written by a certain Chen Yuanjing 陳元靚 (mid-13th cent.) from the Song period. This book is not mentioned in any other bibliography.
Three images of Xu Xian's 徐咸 Xiangmashu 相馬書 from the Shuofu 說郛 edition, juan 107, showing the 37 critical points of good horses, spots to inspect the quality of hair, and the growth of teeth during the lifetime of horses. Similar images can be found in most books on horse medicine.
The imperial bibliography in the Songshi lists a book Majing, length 3 juan, written by Chang Zhifei 常知非, probably an early Song-period master. His book has not survived in China, but a reprint of a book called Majing in the series Guyi congshu 古逸叢書 is based on a Japanese edition of a horse divination book, compiled by a certain Zhifei 知非, which probably is exactly this text. Another text listed in the Songshi has the lengthy title Guan Lu Li Chunfeng fa Xiao Yi Xiangmajing 管輅李淳風法蕭繹相馬經. Xiao Yi 蕭繹 (Emperor Yuan of the Liang 梁元帝, 508-555) must have been the compiler of the book that described the divination methods of Guan Lu 管輅 (209-256) and Li Chunfeng 李淳風 (602-670). Li Chunfeng is better known as a commentator to early mathematical treatises.
The bibliography Junzhai dushu zhi 郡齋讀書志 lists an anonymous Xiangmajing, with a length of 2 juan, of which it is said that it includes paragraphs on divining as well as such on medicine. The book was owned by the collector Li Shu 李淑 (Li Xianchen 李獻臣). The bibliographical chapter in the encyclopaedia Wenxian tongkao 文獻通考 quotes from the Junzhai dushu zhi, listing a book with the title Ji maxiang shu 集馬相書, with the length of 1 juan, compiled by Sun Gui 孫珪, a Song-period person. Yet the Junzhai dushu zhi does not list such a book, but it is found in the bibliography Zhizhai shulu jieti 直齋書錄解題. From the name, the Ji maxiang shu seemed to be a kind of overview of all books on horse inspection. It is again listed in Chen Di's 陳第 (1541-1617) catalogue Shishantang cangshu mulu 世善堂藏書目錄 from the Ming period 明 (1368-1644) but was lost thereafter.
A Majing with a length of 3 fascicles, compiled by the Song-period master Li Mingzhong 李明仲 (d. 1110), is mentioned in Lu Youren's 陸友仁 (1290-1338) book Yanbei zazhi 研北雜志 from the Yuan period 元 (1279-1368), but not in any Song or Yuan bibliographies (including that in the Songshi). Li Mingzhong, actual name Li Jie 李誡 (d. 1110, Mingzhong is his courtesy name), is known as the compiler of the architectural handbook Yingzao fashi 營造法式.