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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to