Screen-Cast: Why Do Transform Methods Return Object?

Return to the RPFT Screen-Cast SeriesThis is the eighteenth screen-cast in a series on writing Recursive Pure Functional Transformations (RPFT) of XML. In this screen-cast, I discuss why the transform methods return object instead of some other type such as XObject, XElement, or XNode. The short answer is that sometimes the transform method needs to return a single element or node, and sometimes it needs to return a collection of elements or nodes.

To demonstrate this scenario, I replace a content control with three paragraphs of content.