xml - XSL - Do I need a Value-of? -


<xsl:for-each select="/date/logs">          <rect>          <xsl:attribute name="fill">         red         </xsl:attribute> 

......... portion of xsl transformation document. when process it, red comes out just

&#10;&#9;&#9;red&#10;&#9;&#9; 

do need value-of select , variable. i'm not knowledgeable sorry poor explanation.

could me please, in advance.

you can use literal result elements including attribute values e.g.

<xsl:for-each select="/date/logs">   <rect fill="red"/> </xsl:for-each> 

if want or need populate attribute value based on value in input doc use attribute value template e.g.

<xsl:for-each select="/date/logs">   <rect fill="{@color}"/> </xsl:for-each> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -