Hi,

we don't have a uri resolver for this, so you have to go with a custom one.

Regards
Carsten

2012/11/28  <[email protected]>:
> Hi,
>
> I was looking for a proper URIResolver for my own FOP(1.1)-to-Sling(with CQ5) 
> implementation.
> I thought there must be something, which covers all cases, but for now we use 
> our own built URIResolver.
>
> And Yes, the src-attribute in the FO-Part was handled ... sure, because the 
> URIResolver was not set.
> Maybe you can give me a hint, for using the right Resolver in future? Thanks
>
> Best regards
>
> Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Carsten Ziegeler [mailto:[email protected]]
> Gesendet: Dienstag, 27. November 2012 18:37
> An: [email protected]
> Betreff: Re: using sling parts within a xslt to fetch images
>
> Hi,
>
> I'm not sure I understand your problem, do you have a problem with a 
> namespace not being declared or do you have a problem with the sling:
> url inside the src attribute not being handled?
>
> Carsten
>
> 2012/11/19  <[email protected]>:
>> 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.
>>
>
>
>
> --
> Carsten Ziegeler
> [email protected]
>
> 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.
>



-- 
Carsten Ziegeler
[email protected]

Reply via email to