nanoc/nanoc — pull request #401 by simonsouth (2014-03-15 11:41:50+00:00)
Title: Make XSL filter transform the item, not the layout - issue #399

See issue #399, "XSL filter transforms the stylesheet's (layout's) content, not the item's".

Previously the XSL filter used the value of the "content" parameter passed to the "run" method as the content to transform. But when invoked as a layout, filters are passed the content of the _layout_ in this parameter, not the content of the item. As this filter can only be invoked as a layout it did not work as expected.

This change modifies the filter to use the value of the ":content" parameter passed to the class at initialization as the content to transform, consistent with how layouts are invoked. It also updates the filter's test cases to reflect how the filter is actually used and to ensure the correct input is being transformed.