Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320538 - XPath validator does not allow unary literals and variables in "IF" conditions
Summary: XPath validator does not allow unary literals and variables in "IF" conditions
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BPEL (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: BPEL Validation Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 13:49 EDT by Robert Brodt CLA
Modified: 2022-10-03 11:11 EDT (History)
1 user (show)

See Also:


Attachments
patch for XPathValidator.java (3.40 KB, patch)
2010-07-21 13:52 EDT, Robert Brodt CLA
bbrodt: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Brodt CLA 2010-07-21 13:49:54 EDT
Build Identifier: 20100617-1415

The validator does not understand data types of variables and message parts: if an element's type is boolean it should be possible to use it in a condition, but the validator reports this as "not a boolean expression".

Actually, since we're still using XPath 1.0, there IS no type checking. But, the validator should still allow unary literal and variable references.

Woraround is to use a relational operator to compare the element to 'true', e.g.:

$Message.payload/isOrderValid = 'true' 

Reproducible: Always

Steps to Reproduce:
1. Enter the above expression into an "IF" condition
Comment 1 Robert Brodt CLA 2010-07-21 13:52:44 EDT
Created attachment 174890 [details]
patch for XPathValidator.java
Comment 2 Robert Brodt CLA 2010-07-21 18:20:12 EDT
https://jira.jboss.org/browse/JBIDE-6015
Comment 3 Robert Brodt CLA 2010-07-21 18:20:50 EDT
https://jira.jboss.org/browse/JBIDE-6015
Comment 4 grid.qian CLA 2010-07-23 02:16:50 EDT
apply and test the patch from Bob
Comment 5 Robert Brodt CLA 2012-04-18 15:04:55 EDT
Comment on attachment 174890 [details]
patch for XPathValidator.java

Updated iplog flag for v1.0 release review.