[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Using a URL in a XSL doc

Subject: Using a URL in a XSL doc
From: "Phillip Vamplew" <Phillip@xxxxxxxxxxx>
Date: Tue, 10 Apr 2001 13:18:02 -0000
xsl
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.