Dr. N. B. Dennys, in his “Folk-Lore of China, and its Affinities with that of the Aryan and Semitic Races,” p. 134, cites a legend of the cave Kwang-sio-foo in Kiang-si, which reflects part of the tale of Ali Baba: There was in the neighbourhood a poor herdsman named Chang, his sole surviving relative being a grandmother with whom he lived. One day, happening to pass near the cave, he overheard some one using the following words: “Shih mun kai, Kwai Ku hsen sheng lai,” Stone door, open; Mr. Kwai Ku is coming. Upon this the door of the cave opened and the speaker entered. Having remained there for some time he came out, and saying, “Stone door, close; Mr. Kwai Ku is going,” the door again opened and the visitor departed. Chang’s curiosity was naturally excited, and having several times heard the formula repeated, he waited one day until the genie (for such he was) had taken his departure and essayed to obtain an entrance. To his great delight the door yielded, and having gone inside he found himself in a romantic grotto of immense extent. Nothing however in the shape of treasure met his eye, so having fully explored the place he returned to the door, which shut at his bidding, and went home. Upon telling his grandmother of his adventure she expressed a strong wish to see the wonderful cavern; and thither they accordingly went together the next day. Wandering about in admiration of the scenery, they became separated, and Chang at length, supposing that his grandmother had left, passed out of the door and ordered it to shut. Reaching home, he found to his dismay that she had not yet arrived. She must of course have been locked up in the cave, so back he sped and before long was using the magic sentence to obtain access. But alas! the talisman had failed, and poor Chang fell into an agony of apprehension as he reflected that his grandmother would either be starved to death or killed by the enraged genie. While in this perplexity the genie appeared and asked him what was amiss. Chang frankly told him the truth and implored him to open the door. This the genie refused to do, but told him that his grandmother’s disappearance was a matter of fate. The cave demanded a victim. Had it been a male, every succeeding generation of his family would have seen one of its members arrive at princely rank. In the case of a woman her descendants would in a similar way possess power over demons. Somewhat comforted to know that he was not exactly responsible for his grandmother’s death, Chang returned home and in process of time married. His first son duly became Chang tien shih (Chang, the Master of Heaven), who about A.D. 25 was the first holder of an office which has existed uninterruptedly to the present day.
Ali Khwajah and the Merchant of Baghdad—p. 246.
Precocious Children.—See note at end of the Tale, p. 256.—In the (apocryphal) Arabic Gospel of the Saviour’s Infancy is the following passage: