On 03 Feb 2011, at 18:14, Malcolm Murphy wrote:

Hi Malcolm

> Questions:
> Is this the correct behaviour? Or do I have an environmental problem?

No and no. It does not seem like correct behavior, and at this point, I do not 
suspect an issue in your environment.

> If its not correct....
> 
> 1) Can the external-document element take a Data URI as the src
> parameter by some simple change?

That I cannot immediately judge. However, it definitely does not seem like this 
possibility was taken into account when developing the extension.

> 2) More generally it possible to have the two elements handle the uri
> resolution in the same way?

Ideally, that should be the case. This I could already trace down. The code 
that constructs the image from the URI in the case of fo:external-graphic 
strips off the url() function call before handing the URI over to the 
ImageManager, while fox:external-document passes the specified value, untreated.

The fix for part 2) is a simple modification that affects one line of code. 
org.apache.fop.layoutmgr.ExternalDocumentLayoutManager, line 95, should become:

        String uri = URISpecification.getURL(getExternalDocument().getSrc());

That should fix the cases:
<fox:external-document content-type="pdf" src="url('...')"/>

Part 1) I am not 100% sure of. Judging from the code in 
ExternalDocumentLayoutManager, I would say some modifications may be necessary 
there to cater for the possibility of a Data URI as well.


Regards,

Andreas
---


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to