fix bug in path names for CDA

This commit is contained in:
Grahame Grieve 2020-09-15 10:25:23 +10:00
parent 9fc8b35797
commit 48dca881f3
3 changed files with 12 additions and 5 deletions

View File

@ -930,6 +930,14 @@ public class Element extends Base {
public boolean hasParentForValidator() {
return hasParentForValidator;
}
public void clear() {
comments = null;
children.clear();;
property = null;
elementProperty = null;
xhtml = null;
}
}

View File

@ -96,6 +96,7 @@ public class ChildIterator {
String n = name();
String fn = "";
if (element().getProperty().isChoice()) {
if (element().getProperty().getName().endsWith("[x]")) {
String en = element().getProperty().getName();
en = en.substring(0, en.length() - 3);
String t = n.substring(en.length());
@ -103,6 +104,9 @@ public class ChildIterator {
t = Utilities.uncapitalize(t);
n = en;
fn = ".ofType(" + t + ")";
} else {
// nothing to do?
}
}
if (i > -1 || (element().getSpecial() == null && element().isList())) {
sfx = "[" + Integer.toString(lastCount) + "]";

View File

@ -111,11 +111,6 @@ public class ElementInfo {
return path;
}
public ElementInfo setPath(String path) {
this.path = path;
return this;
}
public int col() {
return element.col();
}