This would extract all document-level style and script content and put them into separate files. <style> and <script> elements will be trivial, but we also need to consider whether we should extract the content of @style attributes and event attributes.