|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: attribute value replaced with <xsl:attribute/>?
Hi, > <xsl:attribute name="smth"/> > replaces the hardcoded original "@smth" attribute in an element like > <el smth="*"> > is it ok? am i safe putting default values into > <el> > and when needed replace the value with > <xsl:if test=""> > <xsl:attribute/> > </xsl:if> > or should i put default stuff into > <xsl:otherwise/>? > i use xalan and i wonder if this behaviour common to all processors? Umm... to tell you the truth, I don't quite understand the question, but if you're asking whether you should use xsl:if or xsl:choose to get what you want, that's a matter of taste. > note that instead of > <td class="jian" class="sizaki">does it change?</td> > i get: > <td class="sizaki">does it change?</td> Yes, because xsl:attribute replaces the existing attribute. But still, you don't want to get two class attributes, as XML doesn't allow that. Instread try to write your XSLT stylesheet to generate <td class="jian sizaki">does it change?</td> which is what you really should want. Cheers, Jarno 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
|

Cart








