Doctrine was the term that described the teachings or principles of law established through past decisions that form the fundamental core beliefs of a government or religious body. Dogma was a rigidly upheld and unquestionable belief. The term originally referred to religious beliefs, but was often used figuratively to describe values held too rigidly, especially commonly Federation values, by those that didn't agree with their values.
Voth Doctrine was the primary religious text of the Voth species. (VOY: "Distant Origin")
Ancient Vulcans were a violent species with many opposing doctrines on logic until, centuries later, they embraced the teachings of Surak and became a peaceful race. (ENT: "Chosen Realm")
In 2151, Captain Jonathan Archer made the decision to withhold the cure to a deadly plague on the planet Valakis, realizing that it would be irresponsible of his crew to interfere with another species' development. He noted that until somebody came up with an official doctrine he would have to remind himself every day that he "didn't come out here to play God." (ENT: "Dear Doctor")
Two years later, upon learning about the Triannon religious beliefs from Pri'Nam D'Jamat and his crew, Captain Archer stated that he disagreed with any doctrine where those who disbelieved were punished by death. (ENT: "Chosen Realm")
In late-2154, Lieutenant Malcolm Reed noted that during their mission to locate the Xindi in the Delphic Expanse, Enterprise NX-01 had lost twenty three men and women which was outside of the traditional military doctrine of twenty percent casualties. Commander T'Pol countered his statement with the Vulcan axiom, "the needs of the many outweigh the needs of the few", explaining that those deaths were honorable ones. (ENT: "The Council")
According to Sybok, modern dogma incorrectly considered Sha Ka Ree a myth concocted by Pagans. (Star Trek V: The Final Frontier)
After creating the android Lal in 2366, Lieutenant Commander Data scanned all of the available literature on parenting, noting that one traditional doctrine insisted "spare the rod and spoil the child", suggesting if a child was not physically punished when they had done something wrong that their development may suffer. (TNG: "The Offspring")
Captain Jean-Luc Picard considered the principles behind the Genome colony on Moab IV to be a dubious scientific endeavor turned into dogma. (TNG: "The Masterpiece Society")
After Benjamin Sisko told him that all he was interested in was gaining the advantage, Dukat retorted "Now, don't go spouting off your holier-than-thou Federation fair-play dogma". (DS9: "The Maquis, Part I")
Several weeks later, Elim Garak told Julian Bashir that he was "a prisoner of Federation dogma and Human prejudice". Bashir had told the Cardassian of his dislike for "The Never Ending Sacrifice". (DS9: "The Wire")
Nikolai Rozhenko considered the Prime Directive to be Federation dogma. (TNG: "Homeward")
In 2373, while reviewing the Federation's cultural database Captain Kathryn Janeway hypothesised that most religious doctrines had a scientific basis "if you scratched hard enough." (VOY: "Sacred Ground")