Based on
the documentation, I guess it should be possible to
1) Create a FileWriter object outside the XTags tag (in other words, with a scriptlet)
2) Use the XTags <style> tag (configured to write to your FileWriter) with
this XSL stylesheet to create a copy of whatever you have put inside the <style> tag.
I'm afraid I can't help more than that 'cause I only learned about the existence of XTags because you mentioned it...