how to put image in xslt

Discussion in 'XML' started by Arun dudee, Apr 11, 2007.

  1. Arun dudee

    Arun dudee Guest

    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>
     
    Arun dudee, Apr 11, 2007
    #1
    1. Advertising

  2. Arun dudee wrote:
    > 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.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Apr 11, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    946
    Silvio Bierman
    Oct 12, 2004
  2. Matt
    Replies:
    1
    Views:
    2,067
    Marrow
    Oct 12, 2004
  3. Replies:
    5
    Views:
    920
  4. Arun dudee

    how to put image in xslt

    Arun dudee, Apr 11, 2007, in forum: XML
    Replies:
    0
    Views:
    343
    Arun dudee
    Apr 11, 2007
  5. Gabriel Rossetti
    Replies:
    3
    Views:
    593
    Jerry Hill
    Apr 25, 2008
Loading...

Share This Page