title: XSLT with database querying
body: <p>I've been doing XML transformation for a while in my Java application and I'm still not clear what the options are and what the best option is to read records from a database and insert it in my transformed output file.  </p>
  
  <p>What I've been doing so far is querying an Oracle database with xQuery that gave me a nodeset as a result. I then passed this result as a parameter to the transformer and queried that parameter during the transformation to insert data into the appropriate nodes.</p>
  
  <p>Is this the best way of doing it though? My base language again is Java. What would be the other options to get the same result?</p>
  
  <p>Also I think it's worth mentioning that most of the times the db query is based on the content of the source XML file. </p>
  
  <p>Thanks</p>