I'm not sure if my question belongs here though it is an advanced question. Feel free to move it to XML land if necessary. Anyhow, I'm attempting the next stage of a rather complicated project involving XML transforms. The big idea is this. I take an object (any arbitray object), convert it to XML and use a pre-authored XML template (not a stylesheet but a custom XML grammar used for templating) to pull information out of the XML and feed an XSLT transform. (Lo and behold! Just typing that last sentence gave me an idea!) I'm not sure exactly how it's going to work. (Even the new idea I just had seems complicated.) I'll elaborate further. Let's say I have a stoopid object called CircusPerformer. I also have three different templates that present the performer as an HTML page, a cash register receipt (for those who like to take CircusPerformers home for private performances), and a shipping label (for the box that the performer travels in). By the way, none of these are real examples. So now I want to process the HTML template. I'm thinking I'll pass the CircusPerformer to an XMLMarshaller that I've already written, which generates SAXEvents for an XSLT transform. I then need a way to begin process on the template in an XSLT stylesheet while referencing the data from the generated CircusPerformer XML. I know there's the document function in XSLT that brings in an XML document but I can't use that to reference the generated XML since it's not serialized rather it's fed into the transformation via SAXEvents. I also need direction on how to introduce my custom object to xml converter into the transform process which will primarily include the HTML template and my stlesheet.
Now here's my big idea. I can transform the template into an XSLT stylesheet and then use that stylesheet to process the XML but that sounds tricky too. The whole project sounds complicated and I'm looking for any advice I can get. I've already put work into the XML converter and that works pretty good. I don't want to serialize the objects that I convert because of overhead. (Also because I promised my boss already that I didn't have to and I don't wanna be a liar.) Please help.