XSL if-expression

J

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
(e-mail address removed)
 
J

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.
 
J

Jim Garrison

Sorry, my original subject line was misleading.

Jim said:
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.
 
M

Martin Honnen

Jim said:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top