Why not try installing the dependencies at the start of the resource collection phase, as mentioned here: OPSCODE wiki: Run Resources from the Resource Collection
So your recipe would look like:
xsltdev = package "libxslt-dev" do
action :nothing
end
xmldev = package "libxml2-dev" do
action :nothing
end
xsltdev.run_action(:install)
xmldev.run_action(:install)
chef_gem "fog"