Xiangwen 詳文 were detailed reports attached to documents submitted to superior institutions.
In official documents of the Song 宋 (960-1279), Yuan 元 (1279-1368) and Ming 明 (1368-1644) periods, the expressions "give to read details" (kanxiang 看詳), "present details" (chengxiang 呈詳) and "according to details" (zhaoxiang 照詳) are often used. In this context, the word "details" (xiang 詳) means "examination”, "investigation". The term "according to the details" (zhaoxiang) was adapted at the end of a petition or report or letter of objection (shenzhuang 申狀), with the whole phrase being "[the submitter] asks humbly that [matters] be implemented according to the details", which means preceding investigation and approval by the throne or superior institution.
The Qing dynasty 清 (1644-1911) followed the use of the Ming period, and this phrase was still used at the end of an application requiring the approval of the superior. A document including this phrase was accordingly called xiang "details". Qing-period xiang documents were important as fundaments for decisions, and were thus taken very seriously and were only used for critical matters. Xiang documents were only allowed for submission to a direct superior, and not to higher institutions. The details were usually included in an appendix called "booklet of details" (xiangce 詳冊, fuxiang 副詳). The appendix remained in the archives of the superior institution, while answer and approval went back down to the submitter.
The physical shape of xiang petitions was a sheet (zhuangshi 狀式) during the Ming period, but the Qianlong Emperor 乾隆帝 (r. 1736-1795) had it changed to the typical folded shape (zheshi 折式). The cover page was used to indicate the bureau of the petitioner, the topic of the matter, and the seal. The use of xiang documents was very widespread during the Qing period, mostly on the local level of military and civilian administration.
A similar type of detailed report were so-called "specifications" (yanwen 驗文, in the late Qing period also called shenwen 申文), which provided details on issues dealt with in a document, but did not need direct reaction by a superior. In contrast to xiangwen, yanwen were not counted as documents of their own.