> I am considering the integration of Xalan-c and sleepycat's berkley > dbxml. > > It is no problem to extract a document from the db, and then > reparse/transform it with Xalan (there is also the possibility to get > directly a Xerces-c DOM tree from the db). But I need to be able to > load new documents coming from the db from within my stylesheets. > > So I guess one solution would be to write an extension function for > the XalanTransformer that loads a document from the db (or even executes > a XQuery), but I was wandering if it is possible to extend the existing > document() function, in order to be able to do > document('bdbxml://container/document'). > > And now the question: is it possible to extend the document() function in > such a way and if yes can someone give me some hints on where to start?
What we really need in Xalan-C is a concept like the JAXP URIResolver, but designed with C++ in mind. We had several proposals on the list a few years back, but didn't really get anywhere with them. My suggestion is you take a look at the implementatation of the existing document() function, because you will see calls to parse URLs go through XSLTProcessorEnvSupportDefault::parseXML(). You can modify that class to intercept calls to specific URL schemes and supply the appropriate document. Dave