As far as I know, most xslt processors expect input to be accessed as an xml tree, dom (not necessarily "the" DOM, but something similar enough). This is generally built using a streaming interface like SAX. So perhaps you could just implement standard DOM API?
Or alternatively, if it's easier, SAX interface using which processors build internal trees. -+ Tatu +- --- On Sat, 2/28/09, Johan Zxcer <nab...@zurahn.com> wrote: > From: Johan Zxcer <nab...@zurahn.com> > Subject: Usage model - no source XML, just api calls > To: xalan-j-users@xml.apache.org > Date: Saturday, February 28, 2009, 10:34 AM > I am new to the world of XSL and Xalan, and I've been > trying to understand > whether my usage model is possible, common, or advisable. > I simply want to > use a stylesheet with no source document, instead using > only calls into my > API to fetch data. I've created an XPath instance to > generate some results, > but cannot figure out how to actually hook it to the > transformer, so that it > is used exclusively as the data source. None of the > samples, nor anything > I've found online seem to use XPath this way. What am > I missing, and are > there any examples on this sort of usage model I could use > as a reference? > Thanks in advance. > > johan > > PS. If it matters, the reason I'm trying to do this: I > have a fairly > complex data model (stored in a db, but no matter) that is > not strictly > hierarchical and could be accessed in many ways for > different reasons. It > would not be easy to generate a source XML that would > contain all the > possible iterations of data that may be needed by a > particular style sheet. > Nor is it feasible to provide all the raw data to be > operated on by XSL > operators and extension functions, due to both complexity > and security of > non-aggregated data. Finally, the stylesheet is intended > to be created by > external users of the system, so for security and > simplicity a limited API > that presents the data in specific calculated fashion is > really required. > > -- > View this message in context: > http://www.nabble.com/Usage-model---no-source-XML%2C-just-api-calls-tp22264025p22264025.html > Sent from the Xalan - J - Users mailing list archive at > Nabble.com.