DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: load image from XML with XSL

  1. #1
    Join Date
    Feb 2006
    Posts
    6

    load image from XML with XSL

    I am using an XML document with all the content from my website, now I want to put my images in there to. To view the document I'm using XSL, how must I put the images in the XML?

  2. #2
    Join Date
    Nov 2005
    Posts
    15
    There are 2 things you can do. You can just put the images into your xsl file, like you do in a normal html document. Or you can put the paths or the names of the images into your xml and then collect it from the file. To collect it from the xml file, use the for each and the value-of methods of xsl. You can find enough on that on the internet. Here you see an example of an empty xsl with html inside.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:output method="html" doctype-public= "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />

    <xsl:template match="/">
    <html >
    <head>
    <title>Here you put the title</title>
    </head>
    <body>
    Here you put the rest of the document

    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

Similar Threads

  1. Replies: 3
    Last Post: 03-04-2009, 08:15 AM
  2. XML and XSL transforming
    By grothlander in forum XML
    Replies: 0
    Last Post: 12-03-2001, 11:06 AM
  3. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM
  4. Replies: 0
    Last Post: 03-20-2001, 02:11 PM
  5. Replies: 2
    Last Post: 03-20-2001, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center