[ https://issues.apache.org/jira/browse/DAFFODIL-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885336#comment-16885336 ]
Michael Beckerle commented on DAFFODIL-2182: -------------------------------------------- Per review comment from Brandon Sloane: {quote}{ . } and \{ .[1] } are the same thing when the current node is an element, aren't they? I don't think "." is supposed to elevate you to the array containing the current element. I tested this here: [https://www.freeformatter.com/xpath-tester.html] with the xml: {{<foo> <a>1</a> <a>2</a> <a>3</a> </foo> }} where the expression {{foo/a[2]/.[1]}} resolved to 2 {quote} This issue may have been discussed in DFDL workgroup email archives in the past. Must search there and/or get clarification about the behavior of .[i]. > Expression .[1] on array should evaluate to the value of the first element. > Produces value of current element. > -------------------------------------------------------------------------------------------------------------- > > Key: DAFFODIL-2182 > URL: https://issues.apache.org/jira/browse/DAFFODIL-2182 > Project: Daffodil > Issue Type: Bug > Components: Middle "End" > Affects Versions: 2.4.0 > Reporter: Michael Beckerle > Priority: Minor > > See test_array_self_expr1. > I believe when an element is an array, that .[i] should be meaningful. > It appears that the DPath compiler is creating an implementation that just > gets the value of the current element ignoring the indexing. > -- This message was sent by Atlassian JIRA (v7.6.14#76016)