xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mehdi houshmand <med1...@gmail.com>
Subject Re: Problem with fo:external-graphic element in processing output from either Saxon or Xalan
Date Thu, 06 Oct 2011 14:07:39 GMT
Hi Mike,

An <external-graphic> an %inline entity, and the only valid child of
an <fo:flow> (http://www.w3.org/TR/xsl/#fo_flow) is a %block. So
basically you need to wrap the external-graphic object in a <fo:block>
object i.e.:

Your XSL-FO code:
...
<fo:flow>
  <fo:external-graphic>...</....

Correct XSL-FO:
...
<fo:flow>
  <fo:block>
    <fo:exteral-graphic>....</fo:external-graphic>
  </fo:block>
...

Hope that helps.

Mehdi

On 6 October 2011 14:30, Mike Chambers <mike@watchfront.co.uk> wrote:
> Hi,
>
> I am getting this runtime error:
> org.apache.fop.fo.ValidationException:
> file:/home/mike/source/docbook/sample_doc2_xalan.fo:1:66363: Error(1/66363):
> fo:external-graphic is not a valid child element of fo:flow.
>
> after I added      <imagedata fileref="Screenshot1.png"/>
> to a very simple DocBook XML sourcefile
>
> I am new to DocBook, XSLT, XSL-FO etc. but looking at the XSL 1.0 specification
> at http://www.w3.org/TR/2001/REC-xsl-20011015/ i see "fo:flow formatting object
> is a sequence of flow objects" and "The fo:external-graphic flow object is used
> for a graphic where the graphics data resides outside of the XML result tree in
> the fo namespace.", implying fo:external-graphic /is/ a valid child element of
> fo:flow ?
>
> I am running FOP on a Ubuntu 10.04 Linux box, using the 'fop' package from the
> Ubuntu repositories.
>
> Maybe it is a Ubuntu package bug, so if anyone can point me at what I should
> look at to work out whether this is the case, or indeed suggest any other reason
> for this run-time error I would appreciate it.
>
> OOI, without the <imagedata/> element in the DocBook source, FOP runs OK and
> generates a usable PDF.
>
> It looks like I have FOP v0.95, judging from the content of the /usr/share/java
> directory.
>
> Thanks,
> Mike
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message