Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make XSL filter transform the item, not the layout - issue #399 #401

Merged
merged 1 commit into from Mar 15, 2014
Merged

Make XSL filter transform the item, not the layout - issue #399 #401

merged 1 commit into from Mar 15, 2014

Conversation

@ghost
Copy link

@ghost ghost commented Mar 15, 2014

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.

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.
@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Mar 15, 2014

Cool stuff!

Loading

ddfreyne added a commit that referenced this issue Mar 15, 2014
…tem-content

Make XSL filter transform the item, not the layout - issue #399
@ddfreyne ddfreyne merged commit 6e558dd into nanoc:release-3.6.x Mar 15, 2014
1 check passed
Loading
@ghost ghost deleted the bug/make-xsl-filter-process-item-content branch Mar 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant