Hi there,

I tried to use FOP not with the rewriter, because I need to use some extra 
configuration.
But now I get stooped at using images out of the DAM. My xslt is not able to 
serve the namespace
(<fo:external-graphic src="sling:/{$resource}/par/{local-name()}.img.png" 
width="100pt" height="100pt"  />)
The namespace is declared at the header of the xslt. So there must be something 
to be set for using
sling-parts inside the xslt. Does anybody know how to do this?

My Java-Code

       FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

                    DefaultConfigurationBuilder cfgBuilder = new 
DefaultConfigurationBuilder();

                    InputStream inputStream = new 
FileInputStream("C:\\dev\\cq\\resource\\xsl\\fop.xconf");

                    Configuration cfg = cfgBuilder.build(inputStream);

                    fopFactory.setUserConfig(cfg);

                    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);

                    TransformerFactory factory = 
TransformerFactory.newInstance();
                    Transformer transformer = factory.newTransformer(new 
StreamSource(new File(xslSource)));

                    transformer.setParameter("resource", resource.getPath());

                    DOMSource domSource = new DOMSource(xml);

                    Result res = new SAXResult(fop.getDefaultHandler());
                    transformer.transform(domSource, res);


Thanks and

Kind regards

M. Sticker



If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.

Reply via email to