[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|