[
https://issues.apache.org/jira/browse/DAFFODIL-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200203#comment-17200203
]
Mike Beckerle commented on DAFFODIL-1118:
-----------------------------------------
Please see description of ticketĀ DAFFODIL-1097 which was closed as duplicate
of this one, but there may be tests mentioned there that can be re-enabled once
this feature is implemented.
> DPath: Query-style expressions - was: fn:count cannot be used to count items
> in a sequence
> ------------------------------------------------------------------------------------------
>
> Key: DAFFODIL-1118
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1118
> Project: Daffodil
> Issue Type: New Feature
> Components: Back End, DFDL Language
> Affects Versions: s15
> Reporter: Jessie Chab
> Priority: Minor
>
> Note: This is an issue with the dpath implementation
> This is similar to DFDL-1075, but different enough to be its own ticket.
> Previously, you could use the fn:count function to count the items in a
> sequence. e.g if you had a sequence like the following:
> <types_of_fruits>
> <apples>5</apples>
> <oranges>4</oranges>
> <pears>1</pears>
> </types_of_fruits>
> You could specify fn:count(types_of_fruits) and it would return 3. If you try
> that with the DPath implementation, you get the following:
> [error] Test
> edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_more_count_0
> failed: java.lang.Exception: Schema Definition Error: Subset The count
> function must reference a single array.
> See tests:
> test_more_count_0
> test_more_count_1
> test_more_count_2
> test_more_count_1b_2
> test_more_count_1b
> (these are in the serialization-with-dpath4-testcleanup branch, and have not
> yet been pulled into 0.15.0)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)