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

RE: How do I generate an HTML anchor element?

Subject: RE: How do I generate an HTML anchor element?
From: "Ben Robb" <Ben@xxxxxxxxxx>
Date: Mon, 28 Oct 2002 14:33:49 -0000
jsp html anchor
You are forgetting what you are actually doing here, which is building a
result tree via your templates.

Longhand:

<xsl:element name="a">
	<xsl:attribute
name="href">SomeURL.jsp?FirstName=FirstValue&amp;SecondValue=<xsl:value-
of select="AAA/BBB"/></xsl:attribute>
	<xsl:text><xsl:value-of select="DDD"/></xsl:text>
</xsl:element>

[i.e. append an element called "a" to the result tree, with an attribute
"href" with the value as specified and the text value of the "DDD" node
on the current tree.]

Shorthand (since that is clearly too much typing]

<a
href="SomeURL.jsp?FirstName=FirstValue&amp;SecondValue={AAA/BBB}"><xsl:v
alue-of select="DDD"/></a>

[i.e. use an attribute value template - denoted by {} ]

If you think of it in the longhand terms (always remembering that you
are building result tree fragments) you won't get as confused...

HTH,

Ben

-----Original Message-----
From: JWALLIS@xxxxxxxxxxxxxxx [mailto:JWALLIS@xxxxxxxxxxxxxxx] 
Sent: 28 October 2002 13:52
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  How do I generate an HTML anchor element?



I have checked the FAQ's for mulberrytech, jennitennison, and Pawson's
without any success. I must not be inputting the search criteria
correctly.

All I'm trying to do is generate an HTML anchor tag. I all the
combinations get syntax errors .

Here is where I originally started:
<table>
<tr>
    <td>
         <a HREF="SomeURL.jsp?FirstName=FirstValue&SecondValue
=<xsl:value-of select="AAA/BBB"/>>        <xsl:value-of select="DDD"/>
         </a>
    </td>
   </tr>
</table>

I have tried just about every weird combination in order get around all
the errors. I'll skip listing all of them for sake of brevity - but here
is a couple attempts: &lt;a HREF="SomeURL.jsp?FirstName=FirstValue&amp;
SecondValue=SecondValue...>someValue&lt;/a>

&#60;a HREF="SomeURL.jsp?FirstName=FirstValue&amp;
SecondValue=SecondValue...>someValue
&#60;/a>

So if someone could just point me to a place in one of the FAQ's that
has info on the anchor tagI would appreciate it.

Thanks in advance, Jim.

<AAA>
      <BBB>1</BBB>
      <CCC>2</CCC>
</AAA>
<DDD>3</DDD>




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


 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.