[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Specifying the src attribute for <fo:externalgraph

Subject: Re: Specifying the src attribute for <fo:externalgraphic>
From: bharathi kongara <bharathikongara@xxxxxxxxx>
Date: Sun, 21 Aug 2005 22:27:43 -0700 (PDT)
external graphic xsl
Sorry the last mail was sent by mistake 

my xml is:

<CoverPage>
  	<Graphics>C:\baby.bmp</Graphics>
    <Title>Cover Page</Title>
</CoverPage>

my xsl is:

<xsl:template match="CoverPage">
      <fo:block break-after="page">
      	 <xsl:apply-templates select="Graphics"/>
      	 <xsl:apply-templates select="Title"/>
         <xsl:apply-templates select="CoverPageText"/>
       </fo:block> 
 </xsl:template>

<xsl:template match="Graphics">
<fo:block>
<fo:external-graphic src="" height="40mm"
width="40mm"/>
</fo:block>
</xsl:template>

My problem is how to refer to the graphic location
specified in the xml, in the src attribute of 
fo:externalgraphic of xsl stylesheet(I left it blank).

Thanks
Bharathi

--- omprakash.v@xxxxxxxxxxxxx wrote:

> 
> 
> 
> 
> 
> Hi,
>  You mean the original xml would have markers in
> place of actual location
> and later you would replace the markers with the
> actual location like
> below:
> 
> main.xml:
> 
> <foo>
> <img id="img1"/>
> </foo>
> 
> and in imgpath.xml you would have
> 
> <images>
> <img id="img1" path="c:\images\ball.gif"/>
> </images>
> 
> In the above case you could use the document
> function to load the second
> xml into your xslt as follows:
> 
> <xsl:variable name="imgpaths"
> select="document('imgpath.xml')"/>
> 
> <xsl:template match="img">
> 
> <xsl:variable name="imgid" select="@id"/>
> 
> <fo:external-graphic>
> <xsl:attribute name="src">
> <xsl:value-of select="concat('URI(',
> $imgpaths/images/img/@path[@id =
> $imgid], ')')"/>
> </xsl:attribute>
> </fo:external-graphic>
> </xsl:template>
> 
> 
> Hope this helps.
> 
> cheers,
> prakash
> 
> 
> 
> 
> 
> 
> 
>                                                     
>                                                     
>                              
>                       bharathi kongara              
>                                                     
>                              
>                       <bharathikongara         To:  
>    xsl-list@xxxxxxxxxxxxxxxxxxxxxx                  
>                              
>                       @yahoo.com>              cc:  
>    (bcc: omprakash.v/Polaris)                       
>                              
>                                               
> Subject:  Specifying the src attribute for
> <fo:externalgraphic>                    
>                       08/22/2005 09:25              
>                                                     
>                              
>                       AM                            
>                                                     
>                              
>                       Please respond                
>                                                     
>                              
>                       to xsl-list                   
>                                                     
>                              
>                                                     
>                                                     
>                              
>                                                     
>                                                     
>                              
> 
> 
> 
> 
> Hi
> 
> I want to get the src attribute for
> <fo:externalgraphic> in xsl stylesheet from an xml
> document. I mean the location of the graphic would
> be
> specified in the xml document, and my style sheet
> should be able to get that location while it is
> converting xml to xsl-fo.(This is because the
> locations are generated dynamically by my Java
> program, I cannot hardcode them into the
> stylesheet).
> Do anyone know how to specify the src attribute in
> this case? Any help would be greatly appreciated
> 
> Bharathi
> 
> Bharathi Kongara,
> Graduate Student,
> Department of Computer Science,
> Utah State University,
> Logan,UT 84321
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> 
> 
> 
> 
> 
> This e-Mail may contain proprietary and confidential
> information and is sent for the intended
> recipient(s) only. 
> If by an addressing or transmission error this mail
> has been misdirected to you, you are requested to
> delete this mail immediately.
> You are also hereby notified that any use, any form
> of reproduction, dissemination, copying, disclosure,
> modification,
> distribution and/or publication of this e-mail
> message, contents or its attachment other than by
> its intended recipient/s is strictly prohibited.
> 
> Visit Us at http://www.polaris.co.in
> 
> 


Bharathi Kongara,
Graduate Student,
Department of Computer Science,
Utah State University,
Logan,UT 84321


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.