stringBuildExpr.append(path);
textMarker = matcher.end();
}
ParentNode parent = childNode.getParent();
if(stringBuildExpr.length() > 0) {
String id;
// TODO If the parent element is the root of the view, this doesn't work right
if(parent != myRootElement && parent.getChildCount() == 1) {
Element parentElement = ((Element)parent);
id = parentElement.getAttributeValue("id");
if(id == null) {
id = "interpolation"+insertedText.size();
parentElement.addAttribute(new Attribute("id", id));
insertedText.put(id, id);
}
} else {
id = "interpolation"+insertedText.size();
insertedText.put(id, id);
Element element = new Element("span", XHTML_NAMESPACE);
element.addAttribute(new Attribute("id", id));
element.appendChild("$$$");
parent.replaceChild(childNode, element);
}
if(textMarker < text.length()) {
stringBuildExpr.append(" + \"").append(backslashEscape(text.substring(textMarker))).append('"');
}