serialize item() func as [] and not .[]

This commit is contained in:
Oliver Egger 2020-01-10 14:16:23 +01:00
parent 0ad3882132
commit b1802ac30e
3 changed files with 7 additions and 2 deletions

View File

@ -389,7 +389,9 @@ public class ExpressionNode {
b.append(")");
}
if (inner != null) {
b.append(".");
if (!((ExpressionNode.Kind.Function == inner.getKind()) && (ExpressionNode.Function.Item == inner.getFunction()))) {
b.append(".");
}
b.append(inner.toString());
}
if (operation != null) {

View File

@ -1080,6 +1080,7 @@ public class FHIRPathEngine {
case Lower: return checkParamCount(lexer, location, exp, 0);
case Upper: return checkParamCount(lexer, location, exp, 0);
case ToChars: return checkParamCount(lexer, location, exp, 0);
case IndexOf : return checkParamCount(lexer, location, exp, 1);
case Substring: return checkParamCount(lexer, location, exp, 1, 2);
case StartsWith: return checkParamCount(lexer, location, exp, 1);
case EndsWith: return checkParamCount(lexer, location, exp, 1);

View File

@ -390,7 +390,9 @@ public class ExpressionNode {
b.append(")");
}
if (inner != null) {
b.append(".");
if (!((ExpressionNode.Kind.Function == inner.getKind()) && (ExpressionNode.Function.Item == inner.getFunction()))) {
b.append(".");
}
b.append(inner.toString());
}
if (operation != null) {