Discussion:
XSL if-expression
(too old to reply)
Jim Garrison
2006-06-16 19:49:28 UTC
Permalink
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
***@athensgroup.com
John Bailo
2006-06-16 20:15:11 UTC
Permalink
<xsl:if test=(name="qd") >
Post by Jim Garrison
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
2006-06-16 20:26:47 UTC
Permalink
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.
Post by John Bailo
<xsl:if test=(name="qd") >
Post by Jim Garrison
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
2006-06-16 20:29:43 UTC
Permalink
Sorry, my original subject line was misleading.
Post by Jim Garrison
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.
Post by John Bailo
<xsl:if test=(name="qd") >
Post by Jim Garrison
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
Martin Honnen
2006-06-17 14:33:46 UTC
Permalink
Post by Jim Garrison
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/
Loading...