On 13.02.2008 17:11:44 Andrejus Chaliapinas wrote: > Hi Jeremias, > > Thanks a lot for your prompt response. Let me clarify some issues. > > > Have you seen this page? > > http://xmlgraphics.apache.org/fop/dev/extensions.html > > > > It contains the missing piece to auto-register your extension > > (/META-INF/services/org.apache.fop.fo.ElementMapping). > > > > Yes, that was exactly that missing piece of information! > > > You should go through the FOUserAgent (getUserAgent().resolveURI() on > > your extension element) to resolve a URI and obtain an InputStream. If > > you do that you can use the following information on the Wiki to > > use authentication when opening network streams: > > http://wiki.apache.org/xmlgraphics-fop/HowTo/BasicHttpAuthentication > > > > Well, I'm looking at general authentication procedure, not just basic http > authentication. That means that in some cases Java program, which starts > whole transformation process, resides on client machine and have opened let > say database connection and thus keeps that connection related session > information in some object. But I don't see that I could pass an arbitrary > object/parameter to FOUserAgent and then reuse that when I need from inside > extension.
The example may indeed be a little restricted for your case. But still, you can provide your own URIResolver and do whatever you want inside it. The clue here is that you get a central place for the whole FOP that lets you convert URIs to InputStreams. And how you set up these InputStreams is entirely up to you. FOP doesn't care. At any rate, you don't pass any objects to the FOUserAgent but to your own, custom-built URIResolver which is set on the FopFactory. > > May I ask what kind of extension you are developing? Just curious. > > > > It's PDF file embedding feature I was looking into last year (you may remind > my several question on where to start), but had no time to do. Though > currently it's very close to initial completion after various experiments > with other tools, which already do that. Ah, I forgot. > Andrejus Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
