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

Re: Inserting into a href tag

Subject: Re: Inserting into a href tag
From: "Ken Dickerson" <kdicke@xxxxxxx>
Date: Fri, 3 Nov 2000 17:02:00 -0400 (EST)
xml href tag
What I am doing for something similar is:
XML file:
<product num="US1234">
<./product>

XSL file:
<A><xsl:attribute name="href">/details<xsl:value-of
select="@class"/></xsl:attribute></A>
see how this works. I did not code this example in my stuff, but it may
work. I did not need to have the directory portion.
Another choice would be to create a variable and use that:
<xsl:variable name="prodnum" select="@num"/>
...
<A href="/details/$prodnum">...

Let me know how it works.
-Ken
(email: ken.dickerson@xxxxxxxxxxx)


----------------------------------------------------------------------------
------------------------------------------
I'm trying to insert a value from an XML file into an href tag, but it is
not working correctly.
This is the XML file:
<product>
<prodnum>
US1234
</prodnum>
</product>
This value will need to be used in many places, such as this inside my XSL
file:
<A href="/details/{prodnum}">
...............
<A href="/view={prodnum}">
................
<A href="/expand={prodnum}">
I'm get output that looks like this:
<A href="/details/%0A%20US1234%0A%20"}
<A href="/view=%0A%20US1234%0A%20"}
<A href="/expand=%0A%20US1234%0A%20"}
What am I doing wrong here? I've tried references like {product/prodnum},
but that returns a blank. Is there something outside of this code that I
need to declare?
thanks,
chris
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
information about yourself, create your own public profile at
http://profiles.msn.com.

ly wa


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.