2
votes

Having previously posted EclipseLink MOXy @XmlPath support for axes/parent

I'm still working with @XmlPath annotation and it appears to me predicate inequality isn't supported?

@XmlPath("node[@attr != 'a']")

Also valid for me would be to check for the existance of an attribute

@XmlPath("node[@x]")

Or even better, that it doesn't exist

@XmlPath("node[not(@x)]")

Is there a heavy cost introducing these features? I'm used to having the whole XPath array of features available. MOXy has provided me some fantastic functionality I'm very grateful for, but it seems a little inflexible in this regard.

1

1 Answers

0
votes

Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.

MOXy currently supports:

  • @XmlPath("node[@x='foo']")

but not:

  • @XmlPath("node[@x!='foo']")
  • @XmlPath("node[@x]")
  • @XmlPath("node[not(@x)]")

Background

MOXy currently uses the same XPath for both marshalling and unmarshalling. It is 100% clear what each of the unsupported XPaths mean in terms of unmarshalling, it is a little less clear in terms of marshalling (but probably not unsolveable).

Action Items

Please enter an enhancement request for this functionality (Specify MOXy as the component). Bugs entered by external users are given priority in our backlog.

For More Information