Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2006, 10:23 PM
Registered User
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Loading Image through XSL

Here is my XML..
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="user.xsl"?>
<UserList>
    <User currentEAddressId="-1" currentNAddressId="-1" currentPhoneNumberId="-1" userId="7">
        <Name value="Christian"/>
        <Surname value="De Martino"/>
        <Gender value="Male"/>
        <Credential value="User"/>
        <Nickname value="parola"/>
        <ImagePath value="C:\Documents and Settings\Friend\Desktop\name.png"/>
        <Birthday value="Wed Mar 24 00:00:00 CET 1999"/>
        <CreationDate value="Tue Jan 24 16:16:51 CET 2006"/>
        <Document userId="-1">
            <Type value="Identity Card"/>
            <Number value="0000000000000"/>
            <Description value=""/>
            <ReleaseAuthority value="Motorization"/>
            <Release value="Tue Jan 24 16:16:17 CET 2006"/>
            <Expiration value="Tue Apr 24 00:00:00 CEST 2007"/>
            <ImagePath value=""/>
        </Document>
        <NAddressList/>
        <EAddressList/>
        <PhoneNumberList/>
    </User>
</UserList>

and here is my XSL

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
  <html>
  <body>
<center><p><b>
        USER LIST</b></p></center>

    <table border="1">
    <tr bgcolor="#FFCC66">
      <th align="left">Name</th>
      <th align="left">Gender</th>
      <th align="left">Credential</th>
      <th align="left">Nickname</th>
<th align="left">Birthday</th>
<th align="left">CreationDate</th>
<th align="left">Doc Type</th>
<th align="left">Doc Expiration</th>
<th align="left">Doc Number</th>
<th align="left">Doc Release Authority</th>
<th align="left">Doc Release</th>
    </tr>
    <xsl:for-each select="UserList/User">
       <xsl:sort select="Name/@value"/>
    <tr>
      <td>
 <xsl:value-of select="ImagePath/@value"/>"
<xsl:value-of select="Name/@value"/>
      <xsl:value-of select="Surname/@value"/></td>
<td><xsl:value-of select="Gender/@value"/></td>
<td><xsl:value-of select="Credential/@value"/></td>
<td><xsl:value-of select="Nickname/@value"/></td>
<td><xsl:value-of select="Birthday/@value"/></td>
<td><xsl:value-of select="CreationDate/@value"/></td>
<td><xsl:value-of select="Document/Type/@value"/></td>
<td><xsl:value-of select="Document/Expiration/@value"/></td>
<td><xsl:value-of select="Document/Number/@value"/></td>
<td><xsl:value-of select="Document/ReleaseAuthority/@value"/></td>
<td><xsl:value-of select="Document/Release/@value"/></td>
    </tr>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template></xsl:stylesheet>


I want to display the image. how do i write my XSL so that i can display the image ..in the output..

in the XML i have
<ImagePath value="C:\Documents and Settings\Friend\Desktop\name.png"/>

and when i view my output i want this image to be displayed as output..






Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading Image to Image Control using JavaScript ctranjith General .NET 1 May 28th, 2013 05:43 AM
Get image size without loading? tal Javascript How-To 3 June 30th, 2007 07:05 AM
image loading abaso.jadhav01 ASP.NET 2.0 Basics 0 October 28th, 2006 01:24 AM
Calling a javascript while loading the xsl suresh_satyam Javascript How-To 0 January 22nd, 2005 03:01 PM
Trouble with loading up an image!! HELP!! essex_girl Java GUI 4 October 1st, 2004 03:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.