XSL if-expression

Discussion in 'XML' started by Jim Garrison, Jun 16, 2006.

  1. Jim Garrison

    Jim Garrison Guest

    OxygenXML is rejecting the following usage with
    "Unknown system function: if"

    <xsl:variable name="qd"
    select="if(value/qDisplay/text() eq '')
    then 'empty'
    else 'right'"/>

    Is this syntactically correct? If not, how should it
    read?

    Jim Garrison
     
    Jim Garrison, Jun 16, 2006
    #1
    1. Advertising

  2. Jim Garrison

    John Bailo Guest

    <xsl:if test=(name="qd") >





    Jim Garrison wrote:
    > OxygenXML is rejecting the following usage with
    > "Unknown system function: if"
    >
    > <xsl:variable name="qd"
    > select="if(value/qDisplay/text() eq '')
    > then 'empty'
    > else 'right'"/>
    >
    > Is this syntactically correct? If not, how should it
    > read?
    >
    > Jim Garrison
    >
     
    John Bailo, Jun 16, 2006
    #2
    1. Advertising

  3. Jim Garrison

    Jim Garrison Guest

    That's an XSLT tag.

    XPath 2.0 also defines (according to the documentation at w3c)
    an if-expression. Look at http://www.w3.org/TR/xpath20/ and
    search for IfExpr. This is the XPath equivalent of the
    Java/C/C++ ternary operator ?:. It's been in the spec since
    2001, and AFAICT I'm using the correct syntax, but Oxygen
    doesn't like it.

    John Bailo wrote:
    >
    > <xsl:if test=(name="qd") >
    >
    >
    >
    >
    >
    > Jim Garrison wrote:
    >> OxygenXML is rejecting the following usage with
    >> "Unknown system function: if"
    >>
    >> <xsl:variable name="qd"
    >> select="if(value/qDisplay/text() eq '')
    >> then 'empty'
    >> else 'right'"/>
    >>
    >> Is this syntactically correct? If not, how should it
    >> read?
    >>
    >> Jim Garrison
    >>
     
    Jim Garrison, Jun 16, 2006
    #3
  4. Jim Garrison

    Jim Garrison Guest

    Re: XPath 2.0 if-expression (was: XSL if-expression)

    Sorry, my original subject line was misleading.

    Jim Garrison wrote:
    > That's an XSLT tag.
    >
    > XPath 2.0 also defines (according to the documentation at w3c)
    > an if-expression. Look at http://www.w3.org/TR/xpath20/ and
    > search for IfExpr. This is the XPath equivalent of the
    > Java/C/C++ ternary operator ?:. It's been in the spec since
    > 2001, and AFAICT I'm using the correct syntax, but Oxygen
    > doesn't like it.
    >
    > John Bailo wrote:
    >>
    >> <xsl:if test=(name="qd") >
    >>
    >>
    >>
    >>
    >>
    >> Jim Garrison wrote:
    >>> OxygenXML is rejecting the following usage with
    >>> "Unknown system function: if"
    >>>
    >>> <xsl:variable name="qd"
    >>> select="if(value/qDisplay/text() eq '')
    >>> then 'empty'
    >>> else 'right'"/>
    >>>
    >>> Is this syntactically correct? If not, how should it
    >>> read?
    >>>
    >>> Jim Garrison
    >>>
     
    Jim Garrison, Jun 16, 2006
    #4
  5. Jim Garrison wrote:

    > OxygenXML is rejecting the following usage with
    > "Unknown system function: if"
    >
    > <xsl:variable name="qd"
    > select="if(value/qDisplay/text() eq '')
    > then 'empty'
    > else 'right'"/>
    >
    > Is this syntactically correct? If not, how should it
    > read?


    Are you sure you have Oxygen set to use an XSLT 2.0 processor like Saxon
    to process that stylesheet?

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jun 17, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Flood
    Replies:
    0
    Views:
    1,023
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,741
    Kevin Flood
    Sep 13, 2004
  3. Klaus Friese
    Replies:
    0
    Views:
    469
    Klaus Friese
    Nov 22, 2004
  4. Ray Tayek
    Replies:
    3
    Views:
    519
    Ray Tayek
    Nov 30, 2003
  5. Replies:
    1
    Views:
    3,613
    A. Bolmarcich
    May 27, 2005
Loading...

Share This Page