Sorry, Karl, I haven't had a chance, yet, to look at what you posted back then. Please note, that FOP 0.91beta doesn't support relative URLs, but the latest development code (FOP Trunk) does. Tracey may have to use the code from Subversion to solve her problem or wait until the next release.
On 07.03.2006 01:19:11 Karl Roberts wrote: > >From the comment in The default FOURIResolver > > This resolver will allow URLs without a scheme, i.e. it assumes 'file:' > as > the default scheme. It also allows relative URLs with scheme, > e.g. file:../../abc.jpg which is not strictly RFC compliant as long as > the > scheme is the same as the scheme of the base URL. If the base URL is > null > a 'file:' URL referencing the current directory is used as the base URL. > > You can pass a different URIResolver into the FOUserAgent before you > instanciate the Fop > > Jeremias Maerki posted a ServletContextURIResolver to trunk at > http://svn.apache.org/viewcvs?rev=379810&view=rev that can take a > "servlet-context:" protocol so graphics in the xsl:fo file can be > resolved relative to the ServletContext. > > I posted a potential change to FOP in an earlier message (subject= RE: > <SOLVED - sort of> Re how to embed a font programatically) that shows > how the URIResolver passed into the UserAgent can be used to locate the > Font metrics as well. > I've not pushed this up to trunk as I'm not an official FOP developer > yet > > Karl Roberts > > -----Original Message----- > From: Tracey Zellmann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 7 March 2006 5:01 AM > To: [email protected] > Subject: relative addressing of font metrics file > > Dirk Bromberg was able to help me earlier today with a typo in my font > metrics url address. I have evrything workkng now. However, I am not > sure how to get relative addressing to work. I can succeed with absolute > addressing since I control where the files are placed. I would feel > better, though, if I could get the relative address to succeed. > > Right now, I have both the fop.xconf file and the ttfcm.xml file in the > same folder conf, under the main application folder SoundEvaluation. > >From within my program, I can get the configuration file with cfg = > cfgBuilder.buildFromFile("conf/fop.xconf"); > > The sample configuration file includes comments that say that relative > config url's will be resolved relative to the location of this file. My > first assumption was that the font metrcis url would therefore be: > <font metrics-url="file:///ttfcm.xml"/> but that did not work. > > I have tried other paths, building up to the absolute path which finally > does work <font > metrics-url="file:///C:/eclipse/workspace/SoundEvaluation/conf/ttfcm.xml > "> > > I must be missing something about the sytax or format of the relative > path. > Can someone guide me? > > Thanks. Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
