Description
I was able to create a schema where three elements on the same level had the same name. When passing the ambiguous path into the fn:local-name() function, the function believed it was being passed a multi-item sequence, since three elements exist with this name. Since the elements are not optional and they are not part of a choice, there should not be any ambiguity when parsing. However, part of our reasoning for moving away from XPath was that we do not need to traverse an entire tree to find all matching nodes for a path, because there will be at most one match. That is not the case in this scenario.
See test local_name_06 in the following files:
daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_functions/Functions.tdml
daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsDebug.scala
daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressions.scala