| Summary: | dynamic context and atomic values | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Lukasz Wycisk <lukasz> | ||||||
| Component: | wst.xpath | Assignee: | Project Inbox <wst.xsl-inbox> | ||||||
| Status: | NEW --- | QA Contact: | Jesper Moller <jesper> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Lukasz Wycisk
Created attachment 206342 [details]
Patch
Created attachment 206343 [details]
testcase
Fix is simple since evaluator accepts every Object it can be additionally filtered for Item objects. It will work with current tests however we think Object[] parameter will probably cause many problems. Do you think the evaluation method can be changed to accept only Item[]? It is easy to create one since NodeType.dom_to_xpath is public. There can also be another method with Node[] parms for current use. I'd go further, by allowing "standard" Java values as the context item, supporting string, misc. numeric types, QNames, etc. For that, we'd need an ItemFactory, replacing NodeType.dom_to_xpath, and allow advanced users to override it, e.g. by putting it into the DynamicContext, or perhaps even passed in to the EvaluationContext. Such an ItemFactory would also help out when adding variables to the DynamicContextBuilder. Is that too far out? |