This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100146 - Expression Builder accepts an invalid XPath expression as valid
Summary: Expression Builder accepts an invalid XPath expression as valid
Status: REOPENED
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Sergey Lunegov
URL:
Keywords:
Depends on: 113534
Blocks:
  Show dependency tree
 
Reported: 2007-04-05 18:26 UTC by Andrei Chistiakov
Modified: 2011-11-30 16:17 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2007-04-05 18:26:08 UTC
Reproduced in build 070403_30.

To reproduce the bug:
- open the Expression Builder and add an xpath expression consisting of
deliberately not existing elements to the Expression text area, e.g.
'ns:aaa/ns:bbbb';
- press Check Syntax button.

XPath is said to be valid.
Comment 1 Nikita Krjukov 2007-04-10 16:16:41 UTC
Actually the XPath is valid in this case from the syntax point of view.
And just this check is implemented. 

I think it's possible to implement a semantics verification in cases like the 
referenced one. But it's very simple and the expression editor is intended for 
complex XPath clauses so it looks redundant. 

The only enhencement I suggest to do is to chenge the validation message to do 
it less ambiguous.
Comment 2 Nikita Krjukov 2007-04-10 16:21:28 UTC
I chenge the message from 
   XPath is valid
to 
   The expression has valid XPath syntax
Comment 3 Andrei Chistiakov 2007-04-19 13:46:50 UTC
Verified in build 070418.
Comment 4 pvarghese 2007-08-22 17:12:40 UTC
entering the expression ns:aaa/ns:bbbb which does not conform to any visible schema in the Expression builder should
warn the user that the expression does not match any visible schema in the project and has to be corrected.

Changing the string to "The expression has valid XPath syntax" is not enough.

Marking this bug as dependent on the bug 113534 for validation of xpath expressions against visible schema.