Hi Bernard ,

The method that  have used is as follows :

eg . XML

<?xml version="1.0"?>
<root>
   <imagePath> $path </imagePath>
</root>

eg.XSL

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="html" />
<xsl:template match="root">

<html>

  <head>
   <title>Example</title>
  </head>
<body>

<img />
<xsl:attribute name="src"><xsl:value-of
select="imagePath"></xsl:attribute>

</body>
</html>

</xsl:template>
</xsl:stylesheet>

The other alternative is to use the xsl variable .

eg .
<xsl:variable name="src"><xsl:value-of
select="imagePath"/></xsl:variable>
This method works 100% for me .

<img src="{$src}" />

Trusting this assisted .

Regs
George


Bernhard Zwischenbrugger wrote:

> The following does not work:
> =======================
> ...
> <xsl:output method="html">
> <xsl:template match=..."
> <img>
> <xsl:attribute name="src">
> <? echo $phpvariable ?>
> </xsl:attribute>
> <xsl:attribute>
> ...
>
> </img>
> </xsl:template>
>
> -----------
>
> <![CDATA[<? echo $phpvariable ?>]]>
> also does not work inside the <xsl:attribute>
>
> ---------------------
> Any Idea how to do that?
>
> The output should look like:
> <img src="<? echo $phpvariable; ?>">
>
> -----------------------------------------------------
> Bernhard Zwischenbrugger       Datenk�che
> Tel.: +43/1/944 57 64          Redaktionssystem
> Mobil.: +43/699/1944 57 64     Web Content Management
> -----------------------------------------------------
> http://www.datenkueche.com


Reply via email to