You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Sam Tsai <sh...@yahoo.com> on 2006/09/16 05:31:35 UTC

fo:external-graphic SRC by xpath

Hi:

I am looking a way to make the SRC of external-graphic tag dynamic. For
example

...
<fo:external-graphic src=" some xpath like root/imgPath  " width="61.00mm"
content-width="61.00mm" height="77.50mm" content-height="77.50mm"/>
...

in this way if I have an xml like
<root>
<imgPath>x:\folder\img1.jpg</imgPath>
<imgPath>x:\folder\img2.jpg</imgPath>
</root>

The xml transformed with XSL:FO will get graphics specified by xpath
 

Is that possible to do this?
-- 
View this message in context: http://www.nabble.com/fo%3Aexternal-graphic--SRC-by-xpath-tf2280958.html#a6336311
Sent from the FOP - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: fo:external-graphic SRC by xpath

Posted by Sam Tsai <sh...@yahoo.com>.
Thanks. I did find this in my XSLT quick guide from O'reilly. I am going to
try it. 
hmm. I need a more detailed book on XSLT!! 


J.Pietschmann wrote:
> 
> Sam Tsai wrote:
>> I am looking a way to make the SRC of external-graphic tag dynamic.
> 
> This sounds like a pure XSLT question. Usually it's better to ask
> on the Mulberry XSL list in such cases.
>   http://www.mulberrytech.com/xsl/xsl-list/
> 
>> <fo:external-graphic src=" some xpath like root/imgPath  "
>> width="61.00mm"
> 
> Use braces around the XPath expression:
> 
> <fo:external-graphic src="{root/imgPath}" width="61.00mm" ...
> 
> Look up the term "attribute value template" or "AVT" in your favorite
> XSLT reference for more information.
> 
>> <imgPath>x:\folder\img1.jpg</imgPath>
> 
> Note that the value for the src of an external graphic should be an URL,
> e.g.
>   <imgPath>file:///x:/folder/img1.jpg</imgPath>
> 
> 
> J.PIetschmann
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/fo%3Aexternal-graphic--SRC-by-xpath-tf2280958.html#a6344006
Sent from the FOP - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: fo:external-graphic SRC by xpath

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Sam Tsai wrote:
> I am looking a way to make the SRC of external-graphic tag dynamic.

This sounds like a pure XSLT question. Usually it's better to ask
on the Mulberry XSL list in such cases.
  http://www.mulberrytech.com/xsl/xsl-list/

> <fo:external-graphic src=" some xpath like root/imgPath  " width="61.00mm"

Use braces around the XPath expression:

<fo:external-graphic src="{root/imgPath}" width="61.00mm" ...

Look up the term "attribute value template" or "AVT" in your favorite
XSLT reference for more information.

> <imgPath>x:\folder\img1.jpg</imgPath>

Note that the value for the src of an external graphic should be an URL,
e.g.
  <imgPath>file:///x:/folder/img1.jpg</imgPath>


J.PIetschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org