You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/02/04 19:30:50 UTC

Re: cvs commit: cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

Does this mean we can now reference images using all Cocoon protocols? I 
mean also for <fo:external-graphic src=""/> and similar?

On 04.02.2004 15:39, sylvain@apache.org wrote:

> sylvain     2004/02/04 06:39:58
> 
>   Modified:    src/blocks/fop/java/org/apache/cocoon/serialization
>                         FOPSerializer.java
>   Log:
>   Add support for all cocoon protocols for <svg:image xlink:href="..."/>
>   

...

>   +        SourceProtocolHandler.setup(this.resolver);

And this by only such a simple change? Woah!! This would be worth a 
mentioning in status.xml, Sylvain, as this solves frequently asked 
questions on FOP/Batik.

Joerg

Re: cvs commit: cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

Posted by Joerg Heinicke <jo...@gmx.de>.
On 04.02.2004 23:28, Sylvain Wallez wrote:

> No, it's not that simple, as you have to include the image into a SVG. A 
> colleague made some patches to FOP to avoid this, but this injects 
> Cocoon-specific code deep into FOP.

So Fop and Batik have different source resolvers? What a pity! At least 
a work around is now available.

>> This would be worth a mentioning in status.xml, Sylvain, as this 
>> solves frequently asked questions on FOP/Batik.
> 
> Done (I forgot to commit it this afternoon).

Thanks.

Joerg

Re: cvs commit: cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

Posted by Sylvain Wallez <sy...@apache.org>.
Joerg Heinicke wrote:

> Does this mean we can now reference images using all Cocoon protocols? 
> I mean also for <fo:external-graphic src=""/> and similar?


Yes, this is possible by including the image into an SVG image in the FO 
document.

>>   +        SourceProtocolHandler.setup(this.resolver);
>
>
> And this by only such a simple change? Woah!!


No, it's not that simple, as you have to include the image into a SVG. A 
colleague made some patches to FOP to avoid this, but this injects 
Cocoon-specific code deep into FOP.

> This would be worth a mentioning in status.xml, Sylvain, as this 
> solves frequently asked questions on FOP/Batik.


Done (I forgot to commit it this afternoon).

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: cvs commit: cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

> Joerg Heinicke wrote:
>
>> Does this mean we can now reference images using all Cocoon 
>> protocols? I mean also for <fo:external-graphic src=""/> and similar?
>>
>> On 04.02.2004 15:39, sylvain@apache.org wrote:
>>
>>> sylvain     2004/02/04 06:39:58
>>>
>>>   Modified:    src/blocks/fop/java/org/apache/cocoon/serialization
>>>                         FOPSerializer.java
>>>   Log:
>>>   Add support for all cocoon protocols for <svg:image 
>>> xlink:href="..."/>
>>
>> ...
>>
>>>   +        SourceProtocolHandler.setup(this.resolver);
>>
>>
>>
>> And this by only such a simple change? Woah!! This would be worth a 
>> mentioning in status.xml, Sylvain, as this solves frequently asked 
>> questions on FOP/Batik.
>
>
>
> I still wonder how this will fork in multithreading environment... 
> This is static method call, and each sitemap have different resolver. 
> Will this crash on 2 simulteneous requests?


This uses a ThreadLocal under the hood, so there should be no problem. 
This trick is necessary because Batik's URL resolving mechanism doesn't 
allow to pass the SourceResolver along the call chain.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: cvs commit: cocoon-2.1/src/blocks/fop/java/org/apache/cocoon/serialization FOPSerializer.java

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Joerg Heinicke wrote:

> Does this mean we can now reference images using all Cocoon protocols? 
> I mean also for <fo:external-graphic src=""/> and similar?
>
> On 04.02.2004 15:39, sylvain@apache.org wrote:
>
>> sylvain     2004/02/04 06:39:58
>>
>>   Modified:    src/blocks/fop/java/org/apache/cocoon/serialization
>>                         FOPSerializer.java
>>   Log:
>>   Add support for all cocoon protocols for <svg:image xlink:href="..."/>
>>   
>
>
> ...
>
>>   +        SourceProtocolHandler.setup(this.resolver);
>
>
> And this by only such a simple change? Woah!! This would be worth a 
> mentioning in status.xml, Sylvain, as this solves frequently asked 
> questions on FOP/Batik.


I still wonder how this will fork in multithreading environment... This 
is static method call, and each sitemap have different resolver. Will 
this crash on 2 simulteneous requests?

Vadim