Someone (X.) brought up Rav Kook's comments in קבצים מכתב יד קדשו that purportedly say that believing in the "DH is not a problem". I think this is a serious stretch for the words of Rav Kook. Firstly, the DH purports that none of the Torah was written by God. It was all weaved together from different authors. Rav Kook speaks of the belief that some parts of the Torah were written in post Mosaic times. Also, Rav Kook ends up with a far more mystical approach to Torah מן השמים, from Heaven, than X. would accept. It seems that Rav Kook is being taken out of context and used against his true meaning. Therefore, I will post a translation, and readers can decide.
What follows is the fourth problem that leads people to leave orthodoxy, as posed by Rav Kook, and his response to it (The Hebrew text can be found at XGH. First the question, then the first page of the answer, and then then the second page of the answer):
"[Problem:] Biblical criticism weakens the foundation of Torah from Heaven, chas veshalom.
[Response:] The truth is as our received tradition states, that nothing has changed the Torah, which has been preserved always with utmost care. However, even according to the incorrect idea that some portions were written later or that certain scribal errors found their way into it, this does not affect in any way the Torah or its authenticity. The authenticity of the Torah is dependent on the acceptance of the Nation, and the Nation accepted and continues to accept it with love. The Nation used [and uses] the Torah in its present form as a symbol of our covenant of faith in God. Therefore, it is impossible for an individual to remove himself from the plural [the Nation], for by the nature of any bond of covenant that is made by general [national] consensus, and by the nature of actions that are accepted [by all as powerful and binding] as national language, and [like] ethics [social norms -ed.] that are accepted by all, no individual is able to change [the covenant ] in opposition to the plural consensus. When one does try to change [his participation in this covenant ], he oppresses his own soul.
Now we can understand well the Godly bond that is present in the Torah, no matter how it reached us, and there is no difference whatsoever what circumstances brought it to us in this [its present] form. Since the pieces are all woven into the Torah, they are included in the Divine holiness. In this Israel is unique [מצויין can also mean noted. -ed.] from all nations, in that the existence of the Nation is bound in being known by the name of the Lord of the world, by which [Whose name] it [the Nation of Israel] is called.
Therefore, the commandments in their entirety, which are bound in the Divine bond, since they are tied to the Torah and written in it, are all in the grasp of the covenant of God. He who keeps them keeps the covenant, and he who breaks them, acts against the covenant . And if there are things which need to be strengthened or weakened [דברים שימצא צורך להחמיר או להקל באופן אחר קצת], the issue is given to the power of the Beit Din [when there are reasons, they have the power even] to uproot actively a part of the Torah. Meanwhile, without a central Beit Din accepted by the Nation, and with, additionally, a national stronghold, we are unable to the spiritual center of the nation for nothing...
When the Torah is upheld by Israel, the feeling is so pure and refined, and the bond to the Torah is so great, that those who have true intellect come to an inner knowledge that there is no place at all for those questions [questions from biblical criticism], for they recognize the hand of God that is spread out over us, who did wonders for us from then until now, so that we cleave to him with love. From a recognition of the greatness of Torah, we recognize its Divinity, so that all the stutterings are done away with from their root, and Israel does well, and the Torah of God is its stronghold."
The Torah is unassailable. It is definitely written by God and given at Sinai. However, even according to those who question each word's origin at Sinai, Rav Kook develops a world-view that maintains the divinity of the Torah as we possess it. The soul of Israel accepted the Torah. God endowed our National soul with a prophetic uniqueness. Its acceptance of things is a type of prophecy. And so, the fact that our nation accepted the Torah makes it God-given through this secondary prophecy, even if you believe that parts were not written originally by Hashem. Even if all of it were not revealed at Sinai, the Torah as we have it in our hands has been turned into prophecy by the soul of the nation of Israel throughout the generations. Even without all its parts being given at Sinai, those later parts would still become part of Torah through Am Yisrael ratification with the national nevuah-spirit.
Furthermore, now that the Torah its entirety has been ratified, no individual can deny its divinity. By doing so, they would be contradicting their own soul's testimony.
Rav Kook ends by reaffirming his stance, true to the nation, that the Torah was in fact given in its entirety to the Nation of Israel on Mt. Sinai.