While regarded as histories, the Nihonshoki (Chronicle of Japan) and Kojiki (Record of Ancient Matters) are texts that include records of ancient mythology and deal with religious matters. A number of esoteric texts detailing ritual and religious matters of the shrines, and discussing the relationship between Shinto and Buddhism, are also among the sacred texts of Shinto.