Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
Stylus Studio Technical Forum
»
ASP & XML?
Topic
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
next
Subject:
ASP & XML?
Author:
Marc Pidoux
Date:
05 Oct 2005 07:30 PM
On my XSL document, I am trying to generate dynamic path to differant images through a loop.
I am basically trying to do this, but it doesn't work of course:
<xsl:for-each select="rss/channel/item/yweather:forecast">
<xsl:value-of select="@day"/>:
<img src="/img/ <xsl:value-of select='@code'/> .gif>
</xsl:for-each>
I want at the end to end up with something like:
Monday: <img src="/img/good.gif" />
Tuesday: <img src="/img/fair.gif" />
etc...
Thanks!
top
Subject:
ASP & XML?
Author:
(Deleted User)
Date:
06 Oct 2005 01:21 PM
Try something like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table width="100%" border="1">
<xsl:for-each select="rss/channel/item/forecast">
<tr>
<td>
<xsl:value-of select="@day"/>
</td>
<td>
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="@code"/>.gif</xsl:attribute>
</xsl:element>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
Powered by
Stylus Studio
, the world's leading
XML IDE
for
XML
,
XSLT
,
XQuery
,
XML Schema
,
DTD
,
XPath
,
WSDL
,
XHTML
,
SQL/XML
, and
XML Mapping
!
Go to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.