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

Bug in XT? was [RE: Change Attribute Value: Search-n-replace

Subject: Bug in XT? was [RE: Change Attribute Value: Search-n-replace isbetter?]
From: John Robert Gardner <jrgardn@xxxxxxxxx>
Date: Tue, 21 Dec 1999 19:00:14 -0500 (EST)
xsl attibute
On Tue, 21 Dec 1999 sara.mitchell@xxxxxxxxx wrote:

> <div2>
> <xsl:attribute name="meter">gayatri</xsl:attibute>
>  <xsl:apply-templates select="*|@*[not(name()='meter')]"/>
> </div2>
> 

Thanks Sara, but I think this is still in the "canon-to-swat a fly"
category here-- or, in the case of what you've suggested, at least a 9mm
handgun. I'm needing to work with the syntax below b/c the examples have
to be as light on esoteric syntax as possible (it's for folks even more
technically disinclined than I repeatedly appear to be) and, quoting the
XSL/T spec:

<snip from="http://www.w3.org/TR/xslt#creating-attributes">
Adding an attribute to an element replaces any existing attribute of that
element with the same expanded-name.
</snip>

Thus, the following _should_ replace hte existing "meter="tristubh""
attribute with "meter="gayatri"" (unless "expanded-name" is some level of 
non-apparent subtlety of meaning):

> > <xsl:template match="div2[@id='1.2']">
> > 			<div2>
> > 			<xsl:attribute name="meter">
> > 			<xsl:text>gayatri</xsl:text>
> > 			</xsl:attribute>
> > 		<xsl:apply-templates select="*|@*" />
> > 			</div2>
> > 		</xsl:template>
> > 



 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.