• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Advanced XSLT processing

Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
"To do good, you actually have to do something." -- Yvon Chouinard
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic