xsl-list
[Top] [All Lists]

Re: taking a literal or a attribute value

2003-06-07 10:27:05

On Montag, Mai 26, 2003, at 10:55  Uhr, David Carlisle wrote:


   hi!

   i would like to set a xml element attribute to the value of
   an currently processed element or a literal.

   i could do it for sure like

   <xsl:choose>
           <xsl:when test="@width"><xsl:value-of select="@width"
   /></xsl:when>       <xsl:othrwise>100%</xsl:othrwise>
   </xsl:choose>

   i just wonder if there are any nice xpaths ways to make
   this more simple..

   thanks alot in advance!

   ciao!
   florian


<foo width="100%">
 <xsl:copy-of select="@width"/>



just saw that message =)

i dont really understand that code though. where is the actual
condition?

thanks!

ciao!
florian


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>