You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewIllegalArgumentException("View expression should not contain conditional expression like <if>, <choose>, <foreach>. But current is \n" + fr.toString());
153
+
if (fr == null) {
154
+
thrownewIllegalArgumentException("<sql> fragments is not found. " + mapperId);
155
+
}
156
+
157
+
Documentdoc = fr.getNode().getOwnerDocument();
158
+
Elementinclude = doc.createElement("include");
159
+
include.setAttribute("refid", mapperId);
160
+
for (Map.Entry<String, String> entry : properties.entrySet()) {
161
+
Elementproperty = doc.createElement("property");
162
+
property.setAttribute("name", entry.getKey());
163
+
property.setAttribute("value", entry.getValue());
164
+
include.appendChild(property);
165
+
}
166
+
ElementsqlNode = doc.createElement("sql");
167
+
include.setAttribute("id", mapperId + "-sql");
168
+
sqlNode.appendChild(include);
169
+
170
+
171
+
includeParser.applyIncludes(sqlNode);
172
+
if (!checkValidXmlQuery(sqlNode)) {
173
+
returnsqlNode;
174
+
// GenericTokenParser tokenReplacer1 = new GenericTokenParser("#{", "}", properties::get);
175
+
// GenericTokenParser tokenReplacer2 = new GenericTokenParser("${", "}", properties::get);
// for (; child != null; child = child.getNextSibling()) {
178
+
// if (child.getNodeType() == Node.TEXT_NODE) {
179
+
// String text = tokenReplacer1.parse(child.getTextContent());
180
+
// text = tokenReplacer2.parse(text);
181
+
// child.setTextContent(text);
182
+
// }
183
+
// }
184
+
// return fr.getNode();
185
+
// throw new IllegalArgumentException("View expression should not contain conditional expression like <if>, <choose>, <foreach>. But current is \n" + fr.toString());
0 commit comments