Records of the Grand Historian by Sima Qian (145–90 BC) and the Book of Han by Ban Gu (AD 32–92) differed from other ancient texts that were available to him. His account was preserved and recorded in the 5th-century text of the Book of Later Han by Fan Ye (398–445). His rhapsodies and other literary works displayed a deep knowledge of classic texts, Chinese philosophy, and histories. He also compiled a commentary on the Taixuan (, "Great Mystery") by the Daoist author Yang Xiong (53 BC–AD 18). Xiao Tong (501–531), a crown prince of the Liang Dynasty (502–557), immortalized several of Zhang's works in his literary anthology Selections of Refined Literature (Wen xuan ). Zhang's fu rhapsodies include "Western Metropolis Rhapsody" (Xī jīng fù ), "Eastern Metropolis Rhapsody" (Dōng jīng fù ), "Southern Capital Rhapsody" (Nán dū fù ), "Rhapsody on Contemplating the Mystery" (Sī xuán fù ), and "Rhapsody on Returning to the Fields" (Guī tián fù ). The latter fuses Daoist ideas with Confucianism and was a precursor to later Chinese metaphysical nature poetry, according to Liu Wu-chi. A set of four short lyric poems (shi 詩) entitled "Lyric Poems on Four Sorrows" (Sì chóu shī ), is also included with Zhang's preface. This set constitutes some of the earliest heptasyllabic shi Chinese poetry written. While still in Luoyang, Zhang became inspired to write his "Western Metropolis Rhapsody" and "Eastern Metropolis Rhapsody", which were based on the "Rhapsody on the Two Capitals" by the historian Ban Gu. Zhang's work was similar to Ban's, although the latter fully praised the contemporaneous Eastern Han regime while Zhang provided a warning that it could suffer the same fate as the Western Han if it too declined into a state of decadence and moral depravity. These two works satirized and criticized what he saw as the excessive luxury of the upper classes. Zhang's "Southern Capital Rhapsody" commemorated his home city of Nanyang, home of the restorer of the Han Dynasty, Guangwu. In Zhang Heng's poem "Four Sorrows", he laments that he is unable to woo a beautiful woman due to the impediment of mountains, snows and rivers. Scholars Rafe de Crespigny and David R. Knechtges claim that Zhang wrote this as an innuendo hinting at his inability to keep in contact with the emperor, hindered by unworthy rivals and petty men. This poem is one of the first in China to have