The Princess Bride was originally a 1973 novel written by William Goldman. The book is presented as an abridgment (or "the good parts version") of a longer work by (a fictional) S. Morgenstern.
You're probably more familiar with the 1987 feature film (screenplay written by Goldman himself), and directed by Rob Reiner.
A segment of the book was published as "Duel Scene (From The Princess Bride)" in the anthology The Best of All Possible Worlds (1980), which was edited by Spider Robinson.