Hmm, that’s not going to work because the tax rules do not have access to resources. Only to order information. If you update to 1.2, you get access to a bit more order fields but I think you’re approaching the configuration from the wrong angle trying to base it off the resource.
(Perhaps you’ve used SimpleCart in the past and are trying to model the rules based on that?)
Tax groups are assigned to products directly so when creating a product, regardless of its position in the tree (if any), you should be assigning it to the rate that is correct for that product.
For each product type (from a tax perspective) you need one tax group with associated rules, e.g. “foodstuffs”, “standard rate”, “exempted”. Then you set the right tax group on the product and Commerce can calculate it correctly… does that make sense?