Inline partials should not be captured using an attribute; these are generally large pieces of text and should thus be in the body of the element.

Thus:

1. Check for the href attribute and, if present, read the contents of that file into the $partials collection
2. If there is no href attribute; read the contents of the partial node and use that to set the item in the $partials collection

It might be worth creating an object 'Partial' that abstracts that behaviour (Single Responsibility Principle)