xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Ulrich" <ulr...@pnpconsult.com>
Subject AW: FOP-XSL:dynamic external graphics
Date Mon, 07 Jan 2002 11:44:47 GMT
Yes, it's working !
Thanxs !
k.

-----Urspr√ľngliche Nachricht-----
Von: Jarno.Elovirta@nokia.com [mailto:Jarno.Elovirta@nokia.com]
Gesendet: Montag, 7. Januar 2002 12:28
An: fop-dev@xml.apache.org
Betreff: RE: FOP-XSL:dynamic external graphics


Hi

> I have a problem to data from xml to an xsl - atribute:
>
> the xml file is like:
> ...
> <page>
> <homepage>
>  <table>
>    <tr>
> 	<td>
> 		<img_homepage>http://url/111</img_homepage>
> 	</td>
>    </tr>
>    <tr>
> 	<td>
> 		<img_homepage>http://url/222</img_homepage>
> 	</td>
>    </tr>
>  </table>
> </homepage>
> </page>
>
>
> the xsl stylesheet:
> ....
> <xsl:template match="img_diagramm">
>    	<xsl:variable name = "src" >
>                <xsl:value-of select = "." />
>     	</xsl:variable>
>
> 	<fo:table-row>
>         <fo:table-cell>
>            <fo:block><fo:external-graphic
> src="{/page/homepage/tr/td/img_homepage}"/></fo:block>

This will always evaluate to "http://url/111", no matter if the current
context is the latter img_homepage

>         </fo:table-cell>
>   </fo:table-row>
> </xsl:template>
> .....
>
> The result :
> The image http://url/111 is shown twice !
>
> How can I manage it to show both pictures ?

e.g.

<xsl:template match="tr">
  <fo:table-row>
    <xsl:for-each select="td">
      <fo:table-cell>
        <xsl:apply-templates select="*" />
      </fo:table-cell>
    </xsl:for-each>
  </fo:table-row>
</xsl:template>

<xsl:template match="img_diagramm">
  <fo:block>
    <fo:external-graphic src="{.}" />
  </fo:block>
</xsl:template>

Hope this helps,

Santtu

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Mime
View raw message