Without trying to hijack the thread, if I may provide an interesting angle to the texts of Hinduism, with reference to law.
Religion was the basis of the law in Hinduism, right upto 1956, but more on that later. The source of this law were the Shrutis, or that which is heard, passed down by the word of mouth from sages, learned men, etc. on what is right, good , virtue etc. The Shrutis consist of the Vedas, Upanishads to an extent, the Aranyakas, the Brahmanas, and some even put the Ramayana and Mahabharata among these. However, given the nature of oral history and the need for application to concrete contexts, texts were written by learned scholars such as Narada, Agnavalkhya, Brihaspati, and the much reviled Manu. Given that these authors presented an authoritative version of the Shrutis, their commentaries or the Smritis became the de facto sources of law.
Theoretically, when a Shruti conflicts with a Smriti, the former prevails, though in actual practice it is far more difficult to find out what the Shruti says and the Smriti is accepted all the same. Some of the Smritis, judged by modern standards are patently pro-Brahmin, pro-male, anti-Harijan, anti-women. Naturally because all the Smriti writers were Brahmins, like the author of this post

. However, the question also remains as to how much were they 'interpreting' and how much were they 'reflecting', i.e., do they prescribe do's and don'ts or are they merely re-stating accepted customs and norms.
The matter was complicated, as always in law, by the arrival of positivist English jurists who wanted to know what the law in the new country was. Central authority rapidly deteriorating, not yet replaced by the British legal system in its entirety, there had to be other codes which governed the people. For the Muslims, it was straightforward, the Quran and other holy books as interpreted by the Qazis and Maulvis. The Hindus, being way more diverse and widespread, did not seem to have a coherent form of law guiding their lives, however, that did not stop the British from looking for it, and they hit upon the most educated section of Indian society, the Brahmins. Of course the Brahmins were more than delighted to be recognized as the law keepers for the whole country, never mind that locally each Brahmin priest interpreted as and how he felt like depending on the level of education of the general populace.
Therefore, when the British set up their courts in India, alongside Common law, Hindu law was equally applied, but as interpreted by leading Sanskrit scholars. Of course the British, before 1857 Revolt, did legislate on a large number of matters, slowly replacing Shastric Hindu law, but left a wide area uncovered in the form of family law, which was truly a legal system all by itself. In fact, as late as the last years of the 19th century, noted family law jurist, Mayne predicted that it would be impossible in the foreseeable future to have codified hindu law applicable to the entire country and the whole effort would not be worth the trouble.
It was only in 1956, after long-drawn and acrimonious debate stretching over 5 years that a uniform civil code for the Hindus was drawn up. Notably, it introduced concepts of divorce, property rights, adoptive rights, etc. for women where there had been none. It also rendered entirely academic, the life's study a lawyer would have had to undertake to understand Hindu family law.