Thank you one and all.
I have an PHP MVC framework that uses XSLT for the templates. I have registered some php functions with the template to allow the use of modules in the template. This allows us to call modules at need be instead of running all the modules first regardless if you need them all.
The problem is the fact some (most, if not all) modules also have corresponding css/javascript files for presentation and functionality. So the content of the module is fine, but when the xlst functions are run, the template has gone passed the head of the XHTML page. I need some way to add the module css/javascript files to the xslt template at another spot (preferably the head section but just before the ending body tag is ok).
Can I tranverse the document at the function call and go up to the head section and add nodes (css/js links)? Or am I stuck where the function calls are made?