I wonder if it is possible to manipulate the IDML code from an InDesign plugin? Our idea is to add XSLT to an IDML document and transform that document to an IDML document and generate PDF:s from it. Is that possible?
I'm not sure what you mean by "manipulate the IDML code." I've done something like what you've described, but completely outside of InDesign. Keep in mind an IDML file is just a collection of XML files so making templates that can transform into IDML content is quite possible.
And, when you say "PDF:s" do you mean "PDFs"? Or is "PDF:s" something I'm just not familiar with. Please provide a pointer. If it's just PDFs, then you'll need a running instance of InDesign or InDesign Server to turn the IDML file into a PDF.