[YANGTOOLS-826] Whitespace after "derived-from-or-self" is making ODL emit a warning Created: 07/Nov/17 Updated: 20/Nov/17 Resolved: 20/Nov/17 |
|
| Status: | Verified |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 2.0.0, 1.2.1 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Verthez | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
When an XPath expression has whitespace between "derived-from-or-self" and the following bracket, there is an error occurring during parsing: javax.xml.transform.TransformerException: Could not find function: derived-from-or-self This is because the YANG_XPATH_FUNCTIONS_PATTERN in the Utils class does not allow whitespace before the bracket. But if I look in the XPath Recommendation https://www.w3.org/TR/1999/REC-xpath-19991116/ it says at the end of section 1: "Whitespace can be freely used between tokens." So this is a bug to be fixed in ODL. |
| Comments |
| Comment by Peter Verthez [ 07/Nov/17 ] |
|
We are currently on the Nitrogen release. |
| Comment by Robert Varga [ 07/Nov/17 ] |
|
Can you provide a reproducer example, please? Or at least the full stack trace... |
| Comment by Peter Verthez [ 07/Nov/17 ] |
|
Added example file. Note however that contrary to my description it is not a failure but a warning. Full stack trace: 2017-11-07 14:47:44,900 WARN [default task-8]-[org.opendaylight.yangtools.yang.parser.stmt.rfc6020.Utils] Argument "derived-from-or-self (type, "ex:ethernet")" is not valid XPath string at "example:31:8": javax.xml.transform.TransformerException: Could not find function: derived-from-or-self |
| Comment by Robert Varga [ 07/Nov/17 ] |