Connecting Tech Pros Worldwide Forums | Help | Site Map

xslt correction

Newbie
 
Join Date: May 2009
Posts: 13
#1: May 8 '09
Expand|Select|Wrap|Line Numbers
  1. <xsl:variable name="cls">
  2. <xsl:value-of select="./@class"/>
  3.  
  4. </xsl:variable>    
  5. <xsl:variable name="abc">
  6. <xsl:value-of select="html/head/style/$cls/@style"/>
  7. </xsl:variable>
Can any one tell me wats wrong with this <xsl:value-of select="html/head/style/$cls/@style"/> line . I get node test expected here error when i run this .
Can u provide me an alternative to this .

Newbie
 
Join Date: May 2009
Posts: 7
#2: May 11 '09

re: xslt correction


Try

<xsl:value-of select="html/head/style/*[name(.) = $cls]/@style"/>
Newbie
 
Join Date: May 2009
Posts: 13
#3: May 11 '09

re: xslt correction


thank u very much for ur usefull reply
Reply