how to put image in xslt

A

Arun dudee

how to put img in xslt file where path of imge is present in xml not
my pat of xml is
<root>
<img>
<banner ban="C:/Documents and Settings/Administrator/Desktop/hariom/
xml/b.GIF"></banner>
</img>
<root>
 
M

Martin Honnen

Arun said:
how to put img in xslt file where path of imge is present in xml not
my pat of xml is
<root>
<img>
<banner ban="C:/Documents and Settings/Administrator/Desktop/hariom/
xml/b.GIF"></banner>
</img>
<root>

It is not clear what you want to achieve. Putting an image into xslt
does not make much sense to me. If you want to put an image into the
HTML document that your XSLT stylesheet creates then that makes a lot
more sense. You simply need to transform the XML to HTML e.g. with a
template using an attribute value template
<xsl:template match="img">
<img src="file:///{banner/@ban}"/>
</xsl:template>
Note however that browsers rendering the HTML document might refuse to
load an image from the local file system for security reasons if the
HTML document is served over HTTP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top