You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Chris Bowditch <bo...@hotmail.com> on 2010/09/01 09:57:00 UTC

Re: How to include .fo file into another .fo

Shaki wrote:
> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

<snip/>

> 
>> 2. If you have an XInclude-capable XML parser (or a SAX filter for
>> XInclude), you can use XInclude.
>>
>> http://en.wikipedia.org/wiki/XInclude
>> http://www.w3.org/TR/xinclude/

<snip/>


> 
> I am using Apache FOP. My attempt with XInclude failed.
> 
> File to be included: 2.pdf 
> <fo:block font-size="20pt">
>    Address block
> </fo:block>  
> 
> Master file:
> <fo:block>
>   <xi:include href="2.fo" parse="xml" xmlns:xi="http://www.w3.org/2001/XInclude">
>     <xi:fallback>Include Error</xi:fallback>    
>   </xi:include>
> </fo:block>

You are using relative paths in the reference. Did you try specifying a 
full file URL, e.g. href="file:///c:/mydir/2.fo"

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to include .fo file into another .fo

Posted by Shaki <sh...@gmail.com>.
Amick, Eric <Eric.Amick <at> mail.house.gov> writes:

> 
> Could it be that you need to include a definition for the fo namespace prefix
in the file you are including?
> It's not overly clear from the standard if that is necessary.
> 
> Eric Amick   Systems Engineer II
> Legislative Computer Systems
> 

I tried that with no success


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: How to include .fo file into another .fo

Posted by "Amick, Eric" <Er...@mail.house.gov>.
Could it be that you need to include a definition for the fo namespace prefix in the file you are including? It's not overly clear from the standard if that is necessary.

Eric Amick   Systems Engineer II
Legislative Computer Systems

> -----Original Message-----
> From: Shaki [mailto:shaki18@gmail.com]
> Sent: Wednesday, September 1, 2010 12:54
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: How to include .fo file into another .fo
> 
> Chris Bowditch <bowditch_chris <at> hotmail.com> writes:
> 
> >
> > You are using relative paths in the reference. Did you try specifying
> a
> > full file URL, e.g. href="file:///c:/mydir/2.fo"
> >
> > Chris
> >
> 
> 
> I tried full file URL, received same error message:
> [Fatal Error] Error attempting to parse XML file
> 
> I think the problem is not with the location of the file but with the
> content of
> file.
> 
> If i change XInclude parse parameter from parse="xml" to parse="text",
> it works
> and includes whole file 2.fo as text.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to include .fo file into another .fo

Posted by Shaki <sh...@gmail.com>.
Chris Bowditch <bowditch_chris <at> hotmail.com> writes:

> 
> You are using relative paths in the reference. Did you try specifying a 
> full file URL, e.g. href="file:///c:/mydir/2.fo"
> 
> Chris
> 


I tried full file URL, received same error message:
[Fatal Error] Error attempting to parse XML file

I think the problem is not with the location of the file but with the content of
file.

If i change XInclude parse parameter from parse="xml" to parse="text", it works
and includes whole file 2.fo as text.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org