Subject: [xsl] Using a URL in a XSL doc From: "Phillip Vamplew" <Phillip@xxxxxxxxxxx> Date: Tue, 10 Apr 2001 13:18:02 -0000 |
I am a new xsl developer, I wander if anyone out there can help with my simple problem. Extract of xml file:] ------------------- <programs> <program> <title>The Life and Adventures of Nicholas Nickleby</title> <priority>1</priority> <article_url>http://www.mysite.com/mustwatch/article/1/1,7343,e38584,00.html </article_url> <channel>Sky One</channel> <time>9:00pm</time> <image>1_files/generic_article.jpg</image> </program> </programs> I want to take the <article_url> element and place this in a <A href> call, but currently getting an error. XSL looks like this at the moment. Stylesheet: <!-- Student Style Sheet, Practical Session 4 --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <HTML> <BODY> <TABLE height="280" cellSpacing="0" cellPadding="0" width="612" border="0"> <TBODY> <TR> <TD rowSpan="8"><SPACER width="7" height="285" type="block"/></TD> <TD align="left" colSpan="4"><SPACER width="23" height="5" type="block"/></TD> </TR> <TR> <TD><IMG alt="" src="1_files/mustwatch_leftarrow.gif" border="0"/></TD> <TD align="left" colSpan="2"><FONT color="#400328" size="5">unmissable </FONT></TD> <TD align="right"><FONT color="#280219" size="4">page 1 of 3</FONT></TD> </TR> <xsl:apply-templates select="programs/program"/> </TABLE> </TBODY> </BODY> </HTML> </xsl:template> <xsl:template match="program"> <TR> <TD><SPACER width="23" height="1" type="block"/></TD> <TD colSpan="3" height="23"><FONT size="5"> <A href= <xsl:apply-templates select="article_url"/> > <!--- So I am trying to replace the call above with the article url, it looks dodgy but can't see what it should read> <xsl:apply-templates select="title"/></A>< TD> </TR> </xsl:template> </xsl:stylesheet> Sorry, if this seems really obviously! Many thanks Phil XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using a URL in a XSL doc, Duncan Lock | Thread | RE: [xsl] Using a URL in a XSL doc, Michael Kay |
Re: [xsl] Using a URL in a XSL doc, David Carlisle | Date | RE: [xsl] Having trouble, please he, Michael Kay |
Month |