This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Making dynamic href's in XSL


I think I've run into this before...you'll have to use the xsl:attribute tag

i.e., you'll want
	<a>
	   <xsl:attribute name="href">what ever text you want here<xsl:value-of
select="what_ever_xml_node_you_want"/>
	</a>

or in your case:

	<a>
	   <xsl:attribute name="href">show_tasks.jsp?pcode=<xsl:value-of
select="site_code"/>&#0026;project_number=<xsl:value-of 			select="number"
/>
	   <xsl:value-of select="number" />
	</a>

This should work

Best Regards,
Scott McDermott

From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Brian Burridge
Sent: Wednesday, May 31, 2000 5:19 PM
To: xsl-list@mulberrytech.com
Subject: Making dynamic href's in XSL


I'm trying to build a dynamic href like this:
<xsl:if test="num_active_tasks>0"><a
href="show_tasks.jsp?pcode=<xsl:value-of select="site_code"
/>&#0026;project_number=<xsl:value-of select="number" />"><xsl:value-of
select="number" /></a>

but I get the error "The value of attribute "href" must not contain the
'<' character. ". I understand what the error means, but I'm not sure
how to get around it. Is there a better way of building a dynamic href?

--

Brian N. Burridge
Internet Architect
Ext 3515
The Internet Group - ITSS
Cox Target Media

"Until a person can say deeply and honestly, "I am what I am today
because of the choices I made yesterday," that person cannot say, "I
choose otherwise."



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]