XSL if-expression question
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 4
- Joined: Mon Jun 05, 2006 7:17 pm
XSL if-expression question
OxygenXML is rejecting the following usage with "Unknown system function: if"
I have XPath level set to 2.0
<xsl:variable name="qd"
select="if(value/qDisplay/text() eq '')
then 'empty'
else 'right'"/>
Is this syntactically correct?
I have XPath level set to 2.0
<xsl:variable name="qd"
select="if(value/qDisplay/text() eq '')
then 'empty'
else 'right'"/>
Is this syntactically correct?
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
Where did you set the XPath level to 2.0?
If you edit a stylesheet then you should specify in xsl:stylesheet version="2.0"
Best Regards,
George
Where did you set the XPath level to 2.0?
If you edit a stylesheet then you should specify in xsl:stylesheet version="2.0"
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
George
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Hi,
As George said, you have to change the xsl:stylesheet's version attribute to 2.0 in order for it to validate a version 2.0 XPath "if() then else" expression.
This is also true for running a transformation on the stylesheet (you have to run it using the Saxon 8B transformer).
Indeed, if the stylesheet version remains 1.0 you get the error reported above.
Regards,
Radu
As George said, you have to change the xsl:stylesheet's version attribute to 2.0 in order for it to validate a version 2.0 XPath "if() then else" expression.
This is also true for running a transformation on the stylesheet (you have to run it using the Saxon 8B transformer).
Indeed, if the stylesheet version remains 1.0 you get the error reported above.
Regards,
Radu
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service