Gospel of Pseudo-Matthew based on Gospel of James
Composition date
According to the research of J. Gijsel and R. Beyers (1997), the archetype of the Gospel of Pseudo-Matthew's Recensio-α dates to 800 AD and the composition date to the first half of the seventh century, maybe to around 600 and 625 AD.  Gijsel writes that Joachim's representation in Pseudo-Matthew is meant to evoke the model figure of a Merovingian nobleman, this one, according to Gijsel, being Dagobert I during his reign (629–639). According to Berthold, the composition date of the Gospel of Pseudo-Matthew is around 650 AD at the earliest, due to the fact that it "shows literary dependence on Vita Agnetis of Pseudo-Ambrose", which itself was used in De Virginitate by Aldhelm in 690 AD. According to G. Schneider, the Gospel of Pseudo-Matthew was composed in the 8th or 9th century during the Carolingian dynasty.The work expanded over time.  The base content of Pseudo-Matthew shares many similarities with, and likely used as a source, the apocryphal Gospel of James.  The attribution of the work to Matthew was not present in the earliest versions; the claim Matthew wrote the gospel was only added two centuries later, in the prologue correspondence between the bishops and Jerome.  The similar Gospel of James had been condemned in Western Christianity by Jerome due to its reference to Jesus having brothers; seemingly in an attempt to avoid a similar condemnation, the prologue was added wherein an authority no less than Jerome himself translates the work from Matthew and approves of it.  Similarly, the later sections which include a version of the Infancy Gospel of Thomas are not present in the oldest manuscripts, suggesting that the merging of the Gospel of Thomas content into the combined Pseudo-Matthew work happened later.Content
The narrative is prefaced by a series of letters between the early Church father Jerome and the Bishops Comatius and Heliodorus.  In these letters the Bishops request that Jerome translate a "Hebrew volume, written by the hand of the most blessed Evangelist Matthew," concerning the birth of the virgin mother and the infancy of Jesus. Though the work is attributed to St. Jerome, it is unlikely that St. Jerome actually wrote or translated it: "no one who is acquainted with the style of Jerome's letters will think this one authentic."The author of the pseudo-Jerome letter claims he compiled and translated the work, taking care to "render it word for word, exactly as it is in the Hebrew, since it is asserted that it was composed by the holy Evangelist Matthew, and written at the head of his Gospel," though he expressed doubt as to their authenticity.The first half of the narrative tells the story of St. Joachim and St. Anne, the parents of Mary; Joachim's sorrow and persecution on account of their lack of progeny, his exile and return to Anna with child, and the birth of Mary; her entering service as a temple virgin, her prayerful life and vow of chastity, and the choosing of Joseph as her husband and guardian upon her becoming too old to continue as a temple virgin; the Annunciation; Joseph's distress at finding her pregnant, and his eventual acceptance of her honesty; his and Mary's being tested in the temple, and the acceptance of the people in the temple of Mary's and Joseph's innocence.
The content of the text is primarily an edited reproduction of the Gospel of James, followed by an account of the Flight into Egypt (it is not known on what this is based), and subsequently an edited reproduction of the Infancy Gospel of Thomas. Essentially, it is a fairly successful attempt to merge these texts into a single work. To its sources, the Gospel adds the first known mention of an ox and a donkey being present at the nativity of Jesus.  The work also helped popularize the image of a very young Mary and relatively old Joseph from the Gospel of James.It had a strong influence in medieval thought, partly due to its inclusion in the Golden Legend. One of the consequences of this is the creation of derivative works, such as the Libellus de Nativitate Sanctae Mariae, which consists of just the early part of the text concerning the birth of Mary. Another text to be based on Pseudo Matthew is the Syriac Infancy Gospel, which includes many supernatural embellishments.
Events described in the Gospel of Pseudo-Matthew inspired "The Cherry-Tree Carol".