There's no reason this same function couldn't grab the styles safely from the individual xhtml files using xpath and rewrite it - the search pattern and rewrite function would be exactly the same. Though I've only used xpath to extract information from xhtml... Someone might need to point me in the right direction to insert the updated styles back into into the style tag.
This would also require being able to walk through every item in the manifest as I noted before.
|