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

Manipulation of XSL attributes

Subject: Manipulation of XSL attributes
From: "ciaran byrne" <ciaran.byrne@xxxxxxx>
Date: Mon, 21 Aug 2000 12:59:35 +0100
xsl attributes
Hi all,
	I'm having a problem with the manipulation
of attribute values as follows..

Lets say I have an element
<img src="x.bmp" alt="z.bmp" align="" hspace=""/>
and a param in my XSL called $path, which for this
example has the value "y.bmp"

My desired output is:
<img src="y.bmp" alt="z.bmp"/>  

As can be seen from above I've added in the $path and removed
empty attribute values.

The problem is I'm having no joy implementing this in my XSL.
I was attempting to implement this by building up an attribute set
such as:

<xsl:attribute-set name="attributes">
	<xsl:attribute name="src"><xsl:value-of select="$path"/></xsl:attribute>
	<xsl:if test="string(@alt)">
		<xsl:attribute name="alt"><xsl:value-of select="@alt/></xsl:attribute>
	</xsl:if>
</xsl:attribute-set>
.......
<xsl:copy use-attribute-sets="attribute">

This gives me an error !!
Any ideas anyone ???



 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-2011 All Rights Reserved.