You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Torben Nielsen <tn...@pine.dk> on 2001/01/08 13:45:38 UTC

have a problem with fo:external-graphic

Hi

I've just started using FOP and I have a question recarding the use of "fo:external-graphic" in FOP

If I hardcode the value of the attribute src I load the picture I want.
But if I put in a reference either as Attribute or variable I recieve an error

Error while creating area : Error while recovering Image Informations (file:@FIL3) : @FIL3 (The system cannot find the file specified)

My question is :
    How do I use fo:external-graphic with filenames written in the xmlfile ??

--
Torben Nielsen
Pine Tree Systems DK

************ The XML file ************ 
<?xml version="1.0"?>
<DOC>
   <FILE FIL="01.jpg" FIL2="02.jpg" FIL3="03.jpg"/>
   <FILE FIL="04.jpg" FIL2="05.jpg" FIL3="06.jpg"/>
   <FILE FIL="07.jpg" FIL2="08.jpg" FIL3="09.jpg"/>
</DOC>
 
************ Part of the XSL file ************ 
<xsl:template match="FILE">
   <fo:table>
      <fo:table-column column-width="5cm"/>
      <fo:table-column column-width="5cm"/>
      <fo:table-column column-width="5cm"/>
      <fo:table-body>
         <fo:table-row line-height="60pt">
            <fo:table-cell>
                  <fo:external-graphic src="file:@FIL"/>
               </fo:block>
            </fo:table-cell>
            <fo:table-cell>
                  <fo:external-graphic src="file:@FIL2"/>
               </fo:block>
            </fo:table-cell>
            <fo:table-cell>
                  <fo:external-graphic src="file:@FIL3"/>
               </fo:block>
            </fo:table-cell>
         </fo:table-row>
      </fo:table-body>
   </fo:table>
</xsl:template>


SV: have a problem with fo:external-graphic

Posted by Jesper Thorhauge - Interact <je...@interact.dk>.
Hi Torben

Try with <fo:external-graphic src="file/@FIL"/>    -    slash after
....src="file

Jesper
  -----Oprindelig meddelelse-----
  Fra: Torben Nielsen [mailto:tn@pine.dk]
  Sendt: 8. januar 2001 13:46
  Til: fop-dev@xml.apache.org
  Emne: have a problem with fo:external-graphic


  Hi

  I've just started using FOP and I have a question recarding the use of
"fo:external-graphic" in FOP

  If I hardcode the value of the attribute src I load the picture I want.
  But if I put in a reference either as Attribute or variable I recieve an
error

  Error while creating area : Error while recovering Image Informations
(file:@FIL3) : @FIL3 (The system cannot find the file specified)

  My question is :
      How do I use fo:external-graphic with filenames written in the xmlfile
??

  --
  Torben Nielsen
  Pine Tree Systems DK

  ************ The XML file ************
  <?xml version="1.0"?>
  <DOC>
     <FILE FIL="01.jpg" FIL2="02.jpg" FIL3="03.jpg"/>
     <FILE FIL="04.jpg" FIL2="05.jpg" FIL3="06.jpg"/>
     <FILE FIL="07.jpg" FIL2="08.jpg" FIL3="09.jpg"/>
  </DOC>

  ************ Part of the XSL file ************
  <xsl:template match="FILE">
     <fo:table>
        <fo:table-column column-width="5cm"/>
        <fo:table-column column-width="5cm"/>
        <fo:table-column column-width="5cm"/>
        <fo:table-body>
           <fo:table-row line-height="60pt">
              <fo:table-cell>
                    <fo:external-graphic src="file:@FIL"/>
                 </fo:block>
              </fo:table-cell>
              <fo:table-cell>
                    <fo:external-graphic src="file:@FIL2"/>
                 </fo:block>
              </fo:table-cell>
              <fo:table-cell>
                    <fo:external-graphic src="file:@FIL3"/>
                 </fo:block>
              </fo:table-cell>
           </fo:table-row>
        </fo:table-body>
     </fo:table>
  </xsl:template>