Subject: Re: [xsl] Specifying the src attribute for <fo:externalgraphic> From: bharathi kongara <bharathikongara@xxxxxxxxx> Date: Sun, 21 Aug 2005 22:21:08 -0700 (PDT) |
Hi Prakash Thanks for your immediate help, but I think my problem is a different one; I jus have one 1 xml file and an xsl stylesheet. Let me get those pieces I'm talking abt: test.xml test.xsl <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 text-align="center"> <fo:external-graphic src="C:\baby.bmp" height="40mm" width="40mm"/> </fo:block> </xsl:template> --- 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: [xsl] 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 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Specifying the src attrib, omprakash . v | Thread | Re: [xsl] Specifying the src attrib, bharathi kongara |
Re: [xsl] Specifying the src attrib, omprakash . v | Date | Re: [xsl] Specifying the src attrib, bharathi kongara |
Month |