• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAX; multiple database queries

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Recently, I successfully created an EJB which creates a PDF document from two inputs: data XML created from a single database query, and a stylesheet. To prepare for potentially large inputs, SAX is currently being used (together with XSLT-like STX), in creating streaming transformations from the streaming data XML and streaming stylesheet inputs.

My question concerns the fact that during the transformation step, the data XML created from a single database query is being passed into a new instance of java.xml.transform.stream.StreamSource. Is it possible to input two data XML streams to the transformation process, if data XML input from more than one database query is required? Again, to prepare for potentially large inputs, we are not storing a tree in memory - everything is on-the-fly.

A point in the right direction is greatly appreciated.

Thanks!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand your problem correctly - yes it is possible to combine multiple XML fragments into a single StreamSource. I wrote a utility class to do this for something very similar to your problem. Described in this article You can download the source from my www.wbrogden.com site - look for "XML Article Published."
Bill
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your timely response, William - I appreciate it.

Based on a cursory overview of your "An XML Fragment Reader" white paper, and the associated reader comments, I believe the information will be helpful in solving my problem.

Best wishes.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic