AW: [xep-support] Problem with image-base-url and svg
Chris Bowditch
bowditch_chris at hotmail.com
Thu Mar 10 06:54:08 PST 2005
Werner.Koch at bit.admin.ch wrote:
Just to summarise: you are streaming XSLT result as SAX events to XEP Content
Handler.
<snip/>
Below is part of code where XEP Content Handler is created:
> private ContentHandler getXepContentHandler(Environment env,
> ByteArrayOutputStream baos)
> throws RM90Exception
> {
> ContentHandler result = null;
> StreamSource config = new StreamSource(
>
> this.getClass().getClassLoader().getResourceAsStream(BordereauResolver.XEP_C
> ONFIG_FILE_URL));
>
> config.setSystemId("resource:/ch/admin/bit/edec/core/services/documents/inte
> rnal/utilxml/xep.xml");
> try
> {
> if(this.m_xepFormatter == null)
> {
> Properties p = new Properties();
> p.put("ROOT",
> "resource:/ch/admin/bit/edec/core/services/documents/internal/utilxml/");
> this.m_xepFormatter =
> new FormatterImpl(config, p,
> com.renderx.xep.lib.Logger.NULL_LOGGER);
> }
>
>
> result = this.m_xepFormatter.createContentHandler(
> BordereauResolver.INPUT_FILE_NAME, new FOTarget(baos, "PDF"));
The key line is above. According to XEP API doc, the first argument to the
createContentHandler method is the systemId that XEP usually requires to avoid
seeing "image base not specified" errors. Perhaps someone from RenderX can
confirm whether or not this is a bug. It looks correct to me, but we use API
slightly differently, i.e. by calling FormatterImpl.render method, where
passing systemId as an argument appears to work.
> }
> catch(ConfigurationException ce)
> {
>
> env.getLoggingContext().getBusinessLogger().error(XEP_CONFIGURATION_EXCEPTIO
> N, ce);
> throw new RM90Exception(XEP_CONFIGURATION_EXCEPTION, ce);
> }
>
> return result;
> }
<snip/>
Chris
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
More information about the Xep-support
mailing list