Wenshi tongyi 文史通義 "Comprehensive meaning of literature and historiography" is a historical critique written by the Qing-period 清 (1644-1911) philosopher, writer and historian Zhang Xuecheng 章學誠 (1738-1801).
The book consists of 9 juan, 6 of which constitute the "inner chapters" (neipian 內篇), and 3 the outer ones (waipian 外篇).
In his preface to the essay Hezhou zhi zhiyu 和州志志隅 Zhang Xuecheng explained that the Song-period 宋 (960-1279) historian Zheng Qiao 鄭樵 (1104-1162) had "knowledge about history, but did not follow a historiographic discipline" (you shi shi, er wei you shi xue 有史識而未有史學); Zeng Gong 曾鞏 (1019-1083) did follow scholarly methods of historiography, but not in a standardized way (bu ju shi fa 不具史法); and the Tang-period historian Liu Zhiji 劉知幾 (661-721), author of China's first historical critique Shitong 史通, did apply standardized ways, but was unaware of the meaning of historiography (bu de shi yi 不得史意). Liu Zhiji's book had actually been planned as a theory on historiography, just as Liu Xie's 劉勰 (c. 465-521) earlier book Wenxin diaolong 文心雕龍 as one on literature. Both failed to trespass these narrow borders.
This was one reason why Zhang Xuecheng compiled his Wenshi tongyi. Another one was the fierce contest between writers who advocated that imitation of Han-period 漢 (206 BCE-220 CE) literature against those preferring models from the Song period.
While the inner chapters of his book discuss methods of literature and historiography and the influence of philosophy on writing, the outer chapters are concerning with specialized topics like local gazetteers. Local gazetteers, Zhang explained, were integral histories of one region, and not just books on geography and administration. It was therefore important that they had a consistent structure covering all aspects. In an ideal case the structure of the treatises in the official dynastic histories had to be adopted, the mode of quoting cases as used in judicial texts (lüling dianli 律令典例), and the language of literary books.
While Liu Zhiji had explained the "methods of historiography" (shi fa 史法), Zhang wanted to express the "intention of historiography" (shi yi 史意). Zhang stressed that the Six Classics were actually not books of sacred contents, but had to be interpreted in a historiographical way, because they were in fact nothing else than history books (liujing jie shi 六經皆史). On the other hand, literature was always carrying a philosophical content with it, as "vessels" containing the Way (liujing jie qi 六經皆器). Literature was based on historiography, and its main purpose was the search for the truth.
Zhang thus criticized the Neo-Confucians who exaggerated the sacred character of Confucian writings, the philology school (kaojuxue 考據學, see kaozhengxue 考證學) whose representatives solely relied on the research of words, the "orderliness of meaning" (yili 義理, i.e. argumentation), the "rhetorical school" (cizhangxue 詞章學, wenzhangjia 文章家), for which phraseology and wording was of great importance, or the contemporary wirter Yuan Mei 袁枚 (1716-1797), for whom character and spirit (xingling 性靈) were of interest.
In his chapter Guwen shi bi 古文十弊, Zhang attacked bad usages in ancient literature, in Wenli 文理 he ridicules those adhering too much to formal issues in writing. The chapter "Virtue in a Litterateur" (Wende 文德) suggests to use standard methods of reverence (jing 敬) and benevolence (shu 恕). Instead, Zhang Xuecheng stressed that a mixture of these approaches, using the strength of each individidual interpretative discipline, was fruit-bearing in the criticism of literature in general and of historiography in particular.
Apart from skills, scholarship and knowledge (cai 才, xue 學, shi 識), a historiographer needed "virtue" (shi de 史德), namely truthfulness and objectivity, just as a writer was in need of emotion (qing 情), mind (xin 心) and character (xing 性). "Virtue" in historiography meant that a writer had to apply the "skills of his mind" (xinshu 心術), with all truthfulness and objectivity, in order to discern correctly between excellent and unjust behaviour, and to search for fairness and correctness (shan e bao bian, wu qiu gong zheng 善惡褒貶，務求公正). In contrast to Liu Zhiji, who wrote about official historiography (guanju zuanxiu 館局纂修), Zhang Xuechang had in mind private writings of historiography (yi jia zhi zhushu 一家著述).
Zhang Xuecheng classified history books into originary writings (zhuanshu 撰述) and source books (jizhu 記注). Originary writings were to respect both the rules of historiography and of literature, to have the chance to constitute books of "one school" (jia 家), with an individual and distinctive approach. In contrast to literature, where the writer must express what is in his heart, the historian was not allowed to have his own feelings occupy what he was writing.
The Wenshi tongyi can be seen as a essence of Zhang's lifelong studies. He began to write individual chapters with the age of 35 sui, and the book was not yet finished when he died. For this reason, there are several different editions of the book, the publication of which in 1832 was organized by Zhang's friend Wang Zongyan 王宗炎 (1755-1826) and his son Zhang Huafu 章華紱. The original print was lost during the turmoils of the mid-century, but another print published by Tan Tingxian 譚廷獻 in Hangzhou survives. A third edition was published in 1851 by Wu Chongyao 伍崇躍, who added an afterword (ba 跋).
The inner chapters originally (in the Daliang edition 大梁本) made out only 5 juan, but in the collected writings Zhangshi yishu 章氏遺書, printed by the Jiaye Hall 嘉業堂, a further one was added, as well as eight chapter of suppelements (buyi 補遺) and 5 chapters of further supplements (xinceng buyi 新增補遺). The edition in the series Lingjiange congshu 靈鶼閣叢書 consists of 9 juan.
Ye Changchun 葉長春 (Ye Ying 葉瑛) edited a commented version of the book, to which he added Zhang's critical book on bibliography, Jiaochou tongyi 校讎通義. The 1974 edition of the Shixue Press 史學出版社 in Taibei includes the Fangzhi lüeli 方志略例, a concise text on the principles of local gazetteers.
The Wenshi tongyi is included in the series Yueyatang congshu 粵雅堂叢書, Congshu jicheng chubian 叢書集成 and Sibu beiyao 四部備要.