In the case of the non-restrictive appositive commas are required to set the word or phrase of which it consists apart from the rest of the sentence.
- Example: The dog, a brindle shepherd, greeted us at the gate.
As you see in this example, the phrase “a brindle shepherd” serves to describe the dog, but it is not necessary to the sense of the statement, for the sentence “The dog greeted us at the gate” makes sense without the descriptor. Non-restrictive appositive.
In the case of the restrictive appositive, the sentence requires the appositive in order to convey the thought. No commas are used.
- Example: The book The Da Vinci Code written by Dan Brown is based on a false premise.
Here we have that the appositive “The Da Vinci Code” is required to convey the writer’s message. Dan Brown has written many other books. Restrictive appositive.
(Or is the appositive "The Da Vinci Code written by Dan Brown"? Oh, snap. Well, no commas in either event.
(Or is the phrase "written by Dan Brown" a non-restrictive appositive within an appositive? And if so should the sentence read: The book the Da Vinci Code, written by Dan Brown, is based on a false premise."?
Thus I have demonstrated my lack of grammatical knowledge. Do you see why I paid little attention in class?