This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Simple XSL question
Rob,
> <fo:table-cell padding-left="7cm"><fo:block><fo:inline-graphic height="3cm"
> width="3cm"
> href="<xsl:value-of select="header/headerimage/url"
> />"/></fo:block></fo:table-cell>
>
> But this does not seem to be legal syntax. Does somebody know how to do
> this?
Assumptions:
1. You're writing a stylesheet, and the URL to the image is contained in the XML
document to be processed, enclosed in an <url> element which is contained in a
<headerimage> element which is contained in a <header> element which is a child
of the current node, and all these elements have no siblings of the same name.
(;-)).
2. You're using an old XSL FO version (1999-04-21) - either FOP version 13.0 or
earlier, or XEP.
Then, the syntax would be:
<fo:table-cell padding-left="7cm">
<fo:block>
<fo:inline-graphic height="3cm" width="3cm"
href="{header/headerimage/url}"/>
</fo:block>
</fo:table-cell>
By the way: in XSL FO 1999-04-21, you could use a fo:display-image (which is a
block-level element), inserting it directly into an fo:table cell without an
intercalary fo:block:
<fo:table-cell padding-left="7cm">
<fo:display-graphic height="3cm" width="3cm"
href="{header/headerimage/url}"/>
</fo:table-cell>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list