Link to home
Start Free TrialLog in
Avatar of DDTampa
DDTampa

asked on

apache fop engine error on xsl sheet

I am trying to reference a value stored in an xml which passes the location of an image file. I get an error when running it on the fop which states:
SEVERE: Image not available: No ImagePreloader found for file:

the code in the xsl is:

<xsl:element name="fo:external-graphic">
 <xsl:attribute name="src">file:<xsl:value-of select="rmHeaderImage"/></xsl:attribute>
</xsl:element>

the xml contains:

<rmHeaderImage>/usr/ABC/JPG/2.jpg</rmHeaderImage>

does anyone know what is incorrect w/ this or why I am gettin the error when I try and run this on the Apache fop engine?

Or does anyone know how to correctly reference the rmHeaderImage so as to pull the value in that field to pass the location of the image file?

This is currently a huge impass to the progress of our project and any help is GREATLY appreciated.

Thanks.
Avatar of CyanBlue
CyanBlue
Flag of United States of America image

I have no idea if this has anything to do with ActionScript, but can you post your code that loads the image file if that is the case???  
If it is not, you can Request Attention so that a moderator can take the ActionScript zone out of this topic...

CyanBlue
I know nothing about ActionScript, but if this is an XSLT problem, can you post a bigger chunk of the XSL file, and enough of the XML file to show us its overall structure?
Avatar of DDTampa
DDTampa

ASKER

that was an errant click on my part that I didn't notice.  my apolgies, it should not be in the ActionScript zone.
Avatar of DDTampa

ASKER


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
      <xsl:template match="/">
            <fo:root  xmlns:fo="http://www.w3.org/1999/XSL/Format" >
                  <fo:layout-master-set>
                        <fo:simple-page-master master-name="PageMaster" page-height="11.000in" page-width="8.500in">
                              <fo:region-body margin-bottom="0.500in" margin-top="0.000in" margin-left="0.250in" margin-right="0.250in"/>
                              <fo:region-before display-align="after"/>
                              <fo:region-after display-align="before"/>
                        </fo:simple-page-master>
                  </fo:layout-master-set>
                  <fo:page-sequence master-reference="PageMaster" force-page-count="no-force">
                        <fo:flow flow-name="xsl-region-body">
                              <fo:block>
                                    <fo:block-container height="48.20mm">
                                          <fo:block-container absolute-position="absolute" height="1.605in" left="0.180in" top="0.080in" width="3.081in" overflow="hidden" display-align="before">
                                                <fo:block text-align="start">
                                                <xsl:element name="fo:external-graphic">
                                              <xsl:attribute name="src">file:<xsl:value-of select="rmHeaderImage"/></xsl:attribute>
                                                  </xsl:element>
                                                </fo:block>
                                          </fo:block-container>
                                    </fo:block-container>
                              </fo:block>
                              <xsl:for-each select="/data">
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<fo:root  xmlns:fo="http://www.w3.org/1999/XSL/Format" >
			<fo:layout-master-set>
				<fo:simple-page-master master-name="PageMaster" page-height="11.000in" page-width="8.500in">
					<fo:region-body margin-bottom="0.500in" margin-top="0.000in" margin-left="0.250in" margin-right="0.250in"/>
					<fo:region-before display-align="after"/>
					<fo:region-after display-align="before"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="PageMaster" force-page-count="no-force">
				<fo:flow flow-name="xsl-region-body">
					<fo:block>
						<fo:block-container height="48.20mm">
							<fo:block-container absolute-position="absolute" height="1.605in" left="0.180in" top="0.080in" width="3.081in" overflow="hidden" display-align="before">
								<fo:block text-align="start">
								<xsl:element name="fo:external-graphic">
          						<xsl:attribute name="src">file:<xsl:value-of select="rmHeaderImage"/></xsl:attribute>
		  						</xsl:element>
								</fo:block>
							</fo:block-container>
						</fo:block-container>
					</fo:block>
					<xsl:for-each select="/data">

Open in new window

Avatar of DDTampa

ASKER

<?xml version="1.0" encoding="UTF-8"?>
<data>
<rmHeaderImage>/usr/ABC/JPG/2.jpg</rmHeaderImage>                                                
<rmFooterImage>/usr2/ABC/JPG/footer.jpg</rmFooterImage>                                            
<rmTitle>INVOICE DETAIL REPORT</rmTitle>                                                
<rmRelease>ABC</rmRelease>                                                                          
<rmCompany>2</rmCompany>                                                                          
<rmScreen>Numb</rmScreen>                                                                          
<rmReport>CON2</rmReport>                                                                          
<rmRecords>1</rmRecords>                                                                            
<rmUser>ddtpa2</rmUser>                                                                            
<rmDate>04/15/10</rmDate>                                                                          
<rmTime>06:26:23</rmTime>                                                                          
<rmSearch1>bill5_contract.skey =73</rmSearch1>
ASKER CERTIFIED SOLUTION
Avatar of HackneyCab
HackneyCab
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DDTampa

ASKER

I need it to pick up the information that gets passed in <rmHeaderImage>/usr/ABC/JPG/2.jpg</rmHeaderImage>  because that value can change depending upon the xml that is generated.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DDTampa

ASKER

my apologies, that did work - I just assumed incorrectly.  That solves my initial question and will assign the points to you - thank you.  as f followup - do you know how to increase the overall size of the graphic?  What is displayed is a little smaller than we would like.
Avatar of DDTampa

ASKER

please disregard the changing size question. the graphic it pulled is small.  I can't thank you enough.
Good luck in your project.