String-compare functions?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nasos Makriyiannis

    #1

    String-compare functions?

    Hi,

    I'm new to XSL and I was wondering if there is a string-compare function
    available. I am using the following IF statement but it does not seem to be
    working:

    <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
    ....do something...
    </xsl:if>
    <xsl:if test="boolean(n ormalize-space(name(..)) != 'Stateflow')">
    ....do another thing...
    </xsl:if>

    One of the above two cases should be true but neither of them are called. I
    displayed the value-of name(..) and it comes out as expected (i.e. sometimes
    it's 'Stateflow' and other times it's not!).

    I also tried using the contain() function: <xsl:if
    test="contains( name(..),'State flow') = 'true'"> but that does not work
    either. Again I viewed the value-of contains(name(. .),'Stateflow') and it
    does come out as true.

    Any ides why the none of the IF statements are run?

    thanks,

    -Nasos


  • Dimitre Novatchev

    #2
    Re: String-compare functions?

    Could you, please, provide a complete (but minimal example) -- the
    source.xml, your xslt code.


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL



    "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
    news:bfp4u6$c1m $1@ginger.mathw orks.com...[color=blue]
    > Hi,
    >
    > I'm new to XSL and I was wondering if there is a string-compare function
    > available. I am using the following IF statement but it does not seem to[/color]
    be[color=blue]
    > working:
    >
    > <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
    > ...do something...
    > </xsl:if>
    > <xsl:if test="boolean(n ormalize-space(name(..)) != 'Stateflow')">
    > ...do another thing...
    > </xsl:if>
    >
    > One of the above two cases should be true but neither of them are called.[/color]
    I[color=blue]
    > displayed the value-of name(..) and it comes out as expected (i.e.[/color]
    sometimes[color=blue]
    > it's 'Stateflow' and other times it's not!).
    >
    > I also tried using the contain() function: <xsl:if
    > test="contains( name(..),'State flow') = 'true'"> but that does not work
    > either. Again I viewed the value-of contains(name(. .),'Stateflow') and it
    > does come out as true.
    >
    > Any ides why the none of the IF statements are run?
    >
    > thanks,
    >
    > -Nasos
    >
    >[/color]


    Comment

    • Nasos Makriyiannis

      #3
      Re: String-compare functions?

      Sure thing. Do you have an e-mail where I can send you the files? I'm having
      trouble attaching documents to the newsgroup.

      I'll provide an explanation in the e-mail also.

      regards,

      -Nasos

      "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
      news:bfp7mi$grh s0$1@ID-152440.news.uni-berlin.de...[color=blue]
      > Could you, please, provide a complete (but minimal example) -- the
      > source.xml, your xslt code.
      >
      >
      > =====
      > Cheers,
      >
      > Dimitre Novatchev.
      > http://fxsl.sourceforge.net/ -- the home of FXSL
      >
      >
      >
      > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
      > news:bfp4u6$c1m $1@ginger.mathw orks.com...[color=green]
      > > Hi,
      > >
      > > I'm new to XSL and I was wondering if there is a string-compare function
      > > available. I am using the following IF statement but it does not seem to[/color]
      > be[color=green]
      > > working:
      > >
      > > <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
      > > ...do something...
      > > </xsl:if>
      > > <xsl:if test="boolean(n ormalize-space(name(..)) != 'Stateflow')">
      > > ...do another thing...
      > > </xsl:if>
      > >
      > > One of the above two cases should be true but neither of them are[/color][/color]
      called.[color=blue]
      > I[color=green]
      > > displayed the value-of name(..) and it comes out as expected (i.e.[/color]
      > sometimes[color=green]
      > > it's 'Stateflow' and other times it's not!).
      > >
      > > I also tried using the contain() function: <xsl:if
      > > test="contains( name(..),'State flow') = 'true'"> but that does not work
      > > either. Again I viewed the value-of contains(name(. .),'Stateflow') and[/color][/color]
      it[color=blue][color=green]
      > > does come out as true.
      > >
      > > Any ides why the none of the IF statements are run?
      > >
      > > thanks,
      > >
      > > -Nasos
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Nasos Makriyiannis

        #4
        Re: String-compare functions?

        OK here it is (I sent you 2 files to your Yahoo address so please disregard
        them):

        ===XML====

        <?xml version="1.0" ?>
        <METRICSINFORMA TION>
        <Stateflow>
        <chartName>char t_constant</chartName>
        <numTransition> DIFFTAG_rem 3 DIFFTAG_add 4</numTransition>
        <transitionData >
        <labelString> ?</labelString>
        </transitionData>
        </Stateflow>
        </METRICSINFORMAT ION>

        ===============


        ====XSL======== =

        <?xml version="1.0"?>

        <xsl:styleshe et version="1.0"
        xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">


        <xsl:template match="/">
        <html>
        <head>
        <basefont face="Arial" size="4" />
        </head>
        <body>
        <ol>
        <xsl:apply-templates select="/METRICSINFORMAT ION/Stateflow"/>
        </ol>
        </body>
        </html>
        </xsl:template>


        <xsl:template name="Stateflow " match="/METRICSINFORMAT ION/Stateflow">

        <xsl:for-each select="*">

        <xsl:call-template name="GlobalTem plateStateflow"/>

        </xsl:for-each>

        <xsl:for-each select="*/*">

        <xsl:call-template name="GlobalTem plateStateflow"/>

        </xsl:for-each>
        </xsl:template>


        <xsl:template name = "GlobalTemplate Stateflow" match='/METRICSINFORMAT ION'>


        <xsl:if test="boolean(c ontains(name(.. ),'Stateflow')) ">
        <xsl:variable name="chartName BB" select="../chartName"/>
        <xsl:variable name="chartName "
        select="normali ze-space($chartNam eBB)"/>
        </xsl:if>
        <xsl:if test="boolean(c ontains(name,'S tateflow'))">
        <xsl:variable name="chartName BB" select="../../chartName"/>
        <xsl:variable name="chartName "
        select="normali ze-space($chartNam eBB)"/>
        <xsl:variable name="machineN" select="../../machineName"/>
        <xsl:variable name="machineNa me"
        select="normali ze-space($machineN )"/>
        </xsl:if>

        <li><xsl:valu e-of select="$chartN ame"/></li>


        </xsl:template>




        </xsl:stylesheet>

        =============== =============== ==========

        thanks,

        -Nasos

        "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
        news:bfpc6r$hdu ii$1@ID-152440.news.uni-berlin.de...[color=blue]
        > Can't you just put them inline in your message?
        >
        >
        > =====
        > Cheers,
        >
        > Dimitre Novatchev.
        > http://fxsl.sourceforge.net/ -- the home of FXSL
        >
        > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
        > news:bfp9he$l7q $2@ginger.mathw orks.com...[color=green]
        > > Sure thing. Do you have an e-mail where I can send you the files? I'm[/color]
        > having[color=green]
        > > trouble attaching documents to the newsgroup.
        > >
        > > I'll provide an explanation in the e-mail also.
        > >
        > > regards,
        > >
        > > -Nasos
        > >
        > > "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
        > > news:bfp7mi$grh s0$1@ID-152440.news.uni-berlin.de...[color=darkred]
        > > > Could you, please, provide a complete (but minimal example) -- the
        > > > source.xml, your xslt code.
        > > >
        > > >
        > > > =====
        > > > Cheers,
        > > >
        > > > Dimitre Novatchev.
        > > > http://fxsl.sourceforge.net/ -- the home of FXSL
        > > >
        > > >
        > > >
        > > > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
        > > > news:bfp4u6$c1m $1@ginger.mathw orks.com...
        > > > > Hi,
        > > > >
        > > > > I'm new to XSL and I was wondering if there is a string-compare[/color][/color]
        > function[color=green][color=darkred]
        > > > > available. I am using the following IF statement but it does not[/color][/color][/color]
        seem[color=blue]
        > to[color=green][color=darkred]
        > > > be
        > > > > working:
        > > > >
        > > > > <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
        > > > > ...do something...
        > > > > </xsl:if>
        > > > > <xsl:if test="boolean(n ormalize-space(name(..)) != 'Stateflow')">
        > > > > ...do another thing...
        > > > > </xsl:if>
        > > > >
        > > > > One of the above two cases should be true but neither of them are[/color]
        > > called.[color=darkred]
        > > > I
        > > > > displayed the value-of name(..) and it comes out as expected (i.e.
        > > > sometimes
        > > > > it's 'Stateflow' and other times it's not!).
        > > > >
        > > > > I also tried using the contain() function: <xsl:if
        > > > > test="contains( name(..),'State flow') = 'true'"> but that does not[/color][/color][/color]
        work[color=blue][color=green][color=darkred]
        > > > > either. Again I viewed the value-of contains(name(. .),'Stateflow')[/color][/color]
        > and[color=green]
        > > it[color=darkred]
        > > > > does come out as true.
        > > > >
        > > > > Any ides why the none of the IF statements are run?
        > > > >
        > > > > thanks,
        > > > >
        > > > > -Nasos
        > > > >
        > > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Dimitre Novatchev

          #5
          Re: String-compare functions?

          The problem has nothing to do with string comparison.

          You define incorrectly your xsl:variables and they immediately go out of
          scope.

          Then, when you try to use the variable $chartName, it is out of scope (not
          defined at all), so MSXML4 issues the following error message:

          Error occurred while compiling stylesheet '(Untitled)'.

          Code: 0x80004005
          A reference to variable or parameter 'chartName' cannot be resolved. The
          variable or parameter may not be defined, or it may not be in scope.



          In fact, this is a very FAQ:

          If you want to define a xsl:variable so that its value is determined based
          on different conditions, the correct way to do this is:

          <xsl:variable name="comeVar">
          <xsl:choose>
          <xsl:when test="cond1">va lue1</xsl:when>
          <xsl:when test="cond2">va lue2</xsl:when>
          . . . . .
          <xsl:when test="condN">va lueN</xsl:when>
          </xsl:choose>
          </xsl:variable>



          Hope this helped.


          =====
          Cheers,

          Dimitre Novatchev.
          http://fxsl.sourceforge.net/ -- the home of FXSL

          "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
          news:bfpcok$sul $2@ginger.mathw orks.com...[color=blue]
          > OK here it is (I sent you 2 files to your Yahoo address so please[/color]
          disregard[color=blue]
          > them):
          >
          > ===XML====
          >
          > <?xml version="1.0" ?>
          > <METRICSINFORMA TION>
          > <Stateflow>
          > <chartName>char t_constant</chartName>
          > <numTransition> DIFFTAG_rem 3 DIFFTAG_add 4</numTransition>
          > <transitionData >
          > <labelString> ?</labelString>
          > </transitionData>
          > </Stateflow>
          > </METRICSINFORMAT ION>
          >
          > ===============
          >
          >
          > ====XSL======== =
          >
          > <?xml version="1.0"?>
          >
          > <xsl:styleshe et version="1.0"
          > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
          >
          >
          > <xsl:template match="/">
          > <html>
          > <head>
          > <basefont face="Arial" size="4" />
          > </head>
          > <body>
          > <ol>
          > <xsl:apply-templates select="/METRICSINFORMAT ION/Stateflow"/>
          > </ol>
          > </body>
          > </html>
          > </xsl:template>
          >
          >
          > <xsl:template name="Stateflow " match="/METRICSINFORMAT ION/Stateflow">
          >
          > <xsl:for-each select="*">
          >
          > <xsl:call-template name="GlobalTem plateStateflow"/>
          >
          > </xsl:for-each>
          >
          > <xsl:for-each select="*/*">
          >
          > <xsl:call-template name="GlobalTem plateStateflow"/>
          >
          > </xsl:for-each>
          > </xsl:template>
          >
          >
          > <xsl:template name = "GlobalTemplate Stateflow"[/color]
          match='/METRICSINFORMAT ION'>[color=blue]
          >
          >
          > <xsl:if test="boolean(c ontains(name(.. ),'Stateflow')) ">
          > <xsl:variable name="chartName BB" select="../chartName"/>
          > <xsl:variable name="chartName "
          > select="normali ze-space($chartNam eBB)"/>
          > </xsl:if>
          > <xsl:if test="boolean(c ontains(name,'S tateflow'))">
          > <xsl:variable name="chartName BB" select="../../chartName"/>
          > <xsl:variable name="chartName "
          > select="normali ze-space($chartNam eBB)"/>
          > <xsl:variable name="machineN" select="../../machineName"/>
          > <xsl:variable name="machineNa me"
          > select="normali ze-space($machineN )"/>
          > </xsl:if>
          >
          > <li><xsl:valu e-of select="$chartN ame"/></li>
          >
          >
          > </xsl:template>
          >
          >
          >
          >
          > </xsl:stylesheet>
          >
          > =============== =============== ==========
          >
          > thanks,
          >
          > -Nasos
          >
          > "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
          > news:bfpc6r$hdu ii$1@ID-152440.news.uni-berlin.de...[color=green]
          > > Can't you just put them inline in your message?
          > >
          > >
          > > =====
          > > Cheers,
          > >
          > > Dimitre Novatchev.
          > > http://fxsl.sourceforge.net/ -- the home of FXSL
          > >
          > > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
          > > news:bfp9he$l7q $2@ginger.mathw orks.com...[color=darkred]
          > > > Sure thing. Do you have an e-mail where I can send you the files? I'm[/color]
          > > having[color=darkred]
          > > > trouble attaching documents to the newsgroup.
          > > >
          > > > I'll provide an explanation in the e-mail also.
          > > >
          > > > regards,
          > > >
          > > > -Nasos
          > > >
          > > > "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
          > > > news:bfp7mi$grh s0$1@ID-152440.news.uni-berlin.de...
          > > > > Could you, please, provide a complete (but minimal example) -- the
          > > > > source.xml, your xslt code.
          > > > >
          > > > >
          > > > > =====
          > > > > Cheers,
          > > > >
          > > > > Dimitre Novatchev.
          > > > > http://fxsl.sourceforge.net/ -- the home of FXSL
          > > > >
          > > > >
          > > > >
          > > > > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
          > > > > news:bfp4u6$c1m $1@ginger.mathw orks.com...
          > > > > > Hi,
          > > > > >
          > > > > > I'm new to XSL and I was wondering if there is a string-compare[/color]
          > > function[color=darkred]
          > > > > > available. I am using the following IF statement but it does not[/color][/color]
          > seem[color=green]
          > > to[color=darkred]
          > > > > be
          > > > > > working:
          > > > > >
          > > > > > <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
          > > > > > ...do something...
          > > > > > </xsl:if>
          > > > > > <xsl:if test="boolean(n ormalize-space(name(..)) != 'Stateflow')">
          > > > > > ...do another thing...
          > > > > > </xsl:if>
          > > > > >
          > > > > > One of the above two cases should be true but neither of them are
          > > > called.
          > > > > I
          > > > > > displayed the value-of name(..) and it comes out as expected (i.e.
          > > > > sometimes
          > > > > > it's 'Stateflow' and other times it's not!).
          > > > > >
          > > > > > I also tried using the contain() function: <xsl:if
          > > > > > test="contains( name(..),'State flow') = 'true'"> but that does not[/color][/color]
          > work[color=green][color=darkred]
          > > > > > either. Again I viewed the value-of[/color][/color][/color]
          contains(name(. .),'Stateflow')[color=blue][color=green]
          > > and[color=darkred]
          > > > it
          > > > > > does come out as true.
          > > > > >
          > > > > > Any ides why the none of the IF statements are run?
          > > > > >
          > > > > > thanks,
          > > > > >
          > > > > > -Nasos
          > > > > >
          > > > > >
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Nasos Makriyiannis

            #6
            Re: String-compare functions?

            Thanks so much for you time Dimitre! I modified my code and it seems to be
            working now.

            Best wishes,

            -Nasos

            "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
            news:bfpfn8$hhf ci$1@ID-152440.news.uni-berlin.de...[color=blue]
            > The problem has nothing to do with string comparison.
            >
            > You define incorrectly your xsl:variables and they immediately go out of
            > scope.
            >
            > Then, when you try to use the variable $chartName, it is out of scope (not
            > defined at all), so MSXML4 issues the following error message:
            >
            > Error occurred while compiling stylesheet '(Untitled)'.
            >
            > Code: 0x80004005
            > A reference to variable or parameter 'chartName' cannot be resolved. The
            > variable or parameter may not be defined, or it may not be in scope.
            >
            >
            >
            > In fact, this is a very FAQ:
            >
            > If you want to define a xsl:variable so that its value is determined based
            > on different conditions, the correct way to do this is:
            >
            > <xsl:variable name="comeVar">
            > <xsl:choose>
            > <xsl:when test="cond1">va lue1</xsl:when>
            > <xsl:when test="cond2">va lue2</xsl:when>
            > . . . . .
            > <xsl:when test="condN">va lueN</xsl:when>
            > </xsl:choose>
            > </xsl:variable>
            >
            >
            >
            > Hope this helped.
            >
            >
            > =====
            > Cheers,
            >
            > Dimitre Novatchev.
            > http://fxsl.sourceforge.net/ -- the home of FXSL
            >
            > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
            > news:bfpcok$sul $2@ginger.mathw orks.com...[color=green]
            > > OK here it is (I sent you 2 files to your Yahoo address so please[/color]
            > disregard[color=green]
            > > them):
            > >
            > > ===XML====
            > >
            > > <?xml version="1.0" ?>
            > > <METRICSINFORMA TION>
            > > <Stateflow>
            > > <chartName>char t_constant</chartName>
            > > <numTransition> DIFFTAG_rem 3 DIFFTAG_add 4</numTransition>
            > > <transitionData >
            > > <labelString> ?</labelString>
            > > </transitionData>
            > > </Stateflow>
            > > </METRICSINFORMAT ION>
            > >
            > > ===============
            > >
            > >
            > > ====XSL======== =
            > >
            > > <?xml version="1.0"?>
            > >
            > > <xsl:styleshe et version="1.0"
            > > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
            > >
            > >
            > > <xsl:template match="/">
            > > <html>
            > > <head>
            > > <basefont face="Arial" size="4" />
            > > </head>
            > > <body>
            > > <ol>
            > > <xsl:apply-templates select="/METRICSINFORMAT ION/Stateflow"/>
            > > </ol>
            > > </body>
            > > </html>
            > > </xsl:template>
            > >
            > >
            > > <xsl:template name="Stateflow " match="/METRICSINFORMAT ION/Stateflow">
            > >
            > > <xsl:for-each select="*">
            > >
            > > <xsl:call-template name="GlobalTem plateStateflow"/>
            > >
            > > </xsl:for-each>
            > >
            > > <xsl:for-each select="*/*">
            > >
            > > <xsl:call-template name="GlobalTem plateStateflow"/>
            > >
            > > </xsl:for-each>
            > > </xsl:template>
            > >
            > >
            > > <xsl:template name = "GlobalTemplate Stateflow"[/color]
            > match='/METRICSINFORMAT ION'>[color=green]
            > >
            > >
            > > <xsl:if test="boolean(c ontains(name(.. ),'Stateflow')) ">
            > > <xsl:variable name="chartName BB" select="../chartName"/>
            > > <xsl:variable name="chartName "
            > > select="normali ze-space($chartNam eBB)"/>
            > > </xsl:if>
            > > <xsl:if test="boolean(c ontains(name,'S tateflow'))">
            > > <xsl:variable name="chartName BB" select="../../chartName"/>
            > > <xsl:variable name="chartName "
            > > select="normali ze-space($chartNam eBB)"/>
            > > <xsl:variable name="machineN" select="../../machineName"/>
            > > <xsl:variable name="machineNa me"
            > > select="normali ze-space($machineN )"/>
            > > </xsl:if>
            > >
            > > <li><xsl:valu e-of select="$chartN ame"/></li>
            > >
            > >
            > > </xsl:template>
            > >
            > >
            > >
            > >
            > > </xsl:stylesheet>
            > >
            > > =============== =============== ==========
            > >
            > > thanks,
            > >
            > > -Nasos
            > >
            > > "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
            > > news:bfpc6r$hdu ii$1@ID-152440.news.uni-berlin.de...[color=darkred]
            > > > Can't you just put them inline in your message?
            > > >
            > > >
            > > > =====
            > > > Cheers,
            > > >
            > > > Dimitre Novatchev.
            > > > http://fxsl.sourceforge.net/ -- the home of FXSL
            > > >
            > > > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
            > > > news:bfp9he$l7q $2@ginger.mathw orks.com...
            > > > > Sure thing. Do you have an e-mail where I can send you the files?[/color][/color][/color]
            I'm[color=blue][color=green][color=darkred]
            > > > having
            > > > > trouble attaching documents to the newsgroup.
            > > > >
            > > > > I'll provide an explanation in the e-mail also.
            > > > >
            > > > > regards,
            > > > >
            > > > > -Nasos
            > > > >
            > > > > "Dimitre Novatchev" <dnovatchev@yah oo.com> wrote in message
            > > > > news:bfp7mi$grh s0$1@ID-152440.news.uni-berlin.de...
            > > > > > Could you, please, provide a complete (but minimal example) -- the
            > > > > > source.xml, your xslt code.
            > > > > >
            > > > > >
            > > > > > =====
            > > > > > Cheers,
            > > > > >
            > > > > > Dimitre Novatchev.
            > > > > > http://fxsl.sourceforge.net/ -- the home of FXSL
            > > > > >
            > > > > >
            > > > > >
            > > > > > "Nasos Makriyiannis" <nmakriyi@mathw orks.com> wrote in message
            > > > > > news:bfp4u6$c1m $1@ginger.mathw orks.com...
            > > > > > > Hi,
            > > > > > >
            > > > > > > I'm new to XSL and I was wondering if there is a string-compare
            > > > function
            > > > > > > available. I am using the following IF statement but it does not[/color]
            > > seem[color=darkred]
            > > > to
            > > > > > be
            > > > > > > working:
            > > > > > >
            > > > > > > <xsl:if test="boolean(n ormalize-space(name(..)) ='Stateflow')">
            > > > > > > ...do something...
            > > > > > > </xsl:if>
            > > > > > > <xsl:if test="boolean(n ormalize-space(name(..)) !=[/color][/color][/color]
            'Stateflow')">[color=blue][color=green][color=darkred]
            > > > > > > ...do another thing...
            > > > > > > </xsl:if>
            > > > > > >
            > > > > > > One of the above two cases should be true but neither of them[/color][/color][/color]
            are[color=blue][color=green][color=darkred]
            > > > > called.
            > > > > > I
            > > > > > > displayed the value-of name(..) and it comes out as expected[/color][/color][/color]
            (i.e.[color=blue][color=green][color=darkred]
            > > > > > sometimes
            > > > > > > it's 'Stateflow' and other times it's not!).
            > > > > > >
            > > > > > > I also tried using the contain() function: <xsl:if
            > > > > > > test="contains( name(..),'State flow') = 'true'"> but that does[/color][/color][/color]
            not[color=blue][color=green]
            > > work[color=darkred]
            > > > > > > either. Again I viewed the value-of[/color][/color]
            > contains(name(. .),'Stateflow')[color=green][color=darkred]
            > > > and
            > > > > it
            > > > > > > does come out as true.
            > > > > > >
            > > > > > > Any ides why the none of the IF statements are run?
            > > > > > >
            > > > > > > thanks,
            > > > > > >
            > > > > > > -Nasos
            > > > > > >
            > > > > > >
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...