Here's the question. How would you get the Ottoman Empire to become a modern, more or less secular state, with a POD sometime in the 19th Century? (the real challenge is doing it after 1870) The catch is that the title of sultan and everything that goes along with the title, has to be preserved.
The Ottoman Empire WAS a more or less secular state. As for modern, it caught up reasonably well, but had the Powers (except Germany) deliberately trying to keep it weak, for instance, by preventing the building of railways or modernizing its tax system.
A victory against Russia in 1877-78 would give them much greater breathing room to complete planned reforms and would leave some of the more developed areas of the empire under Ottoman control - Bulgaria, for instance, was on the verge of industrialization when it was lost.
What Berlin did was not stop the development of secularism, which Abdul Hamid promoted despite his use of his office of Caliph, but rather the end of movement toward liberal-democracy, particularly at the center, although development continued on the local level. A victory in the war could have led to a perception than constitutionalism was to an extent responsible - also, Abdul Hamid appears to have been favorable to democratic reform at the beginning of his reign, but the empire post-Berlin was in such a precarious state he felt he needed to careful control it to survive - and he was probably correct.
Contrary to what most people seem to think, the Sharia is not really much concerned with religious issues, it's just a framework for the generation of legislation, and is not all that different from Common Law. The only field in which the religious establishment really had any authority was in personal law, like marriage, divorce, inheritance, etc. That is somewhat less true on the periphery in more "colonial" areas like Yemen, but hold for the "core" in the Balkans, Anatolia, and Syria/Palestine.
A "Kemalist-style" state is a very bad idea for the Ottoman Empire, because nationalism would lead to the dissolution of the empire. Also, Kemalism was much more authoritarian than were the Ottomans.