Jump to content

igorjrr

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by igorjrr

  1. I found the answer. Variables created that way (not using select) are considered Reference Tree Fragment (http://msdn.microsoft.com/en-us/library/4wwc9138.aspx).

    It's still possible to use the variable content the normal way, although the object will be a RTF.

    Now, If you have a list of nodes, you have to transform the variable to a NodeSet and then call the nodes() function like

    msxsl:node-set($myvariable)/node()

    Then it will be just like creating a variable with the select argument.

  2. Very simple example... but don't understand why.

     <xsl:variable name="i" select="1" />      <xsl:variable name="a" select="35" />      <xsl:variable name="b" select="'fn'" />      <xsl:variable name="c">        <xsl:if test="$i < $a">          <xsl:value-of select="$b" />        </xsl:if>        <xsl:if test="$i = $a">'test'</xsl:if></xsl:variable>

    At the end, value is a node instead of just the text 'fn'.

    If I use

    xsl:variable name="c" select="$b" />

    Then the value is correct (just 'fn').

     

    Any help?

×
×
  • Create New...