Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java @ 5522:eeac800eb4cd
Datacage: Rename <dc:elements> to <dc:for-each>. We should have done this much earlier.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 29 Mar 2013 11:07:24 +0100 |
parents | 5800a9497b0b |
children | fcf28185ca30 |
comparison
equal
deleted
inserted
replaced
5521:bc140668db82 | 5522:eeac800eb4cd |
---|---|
321 } | 321 } |
322 | 322 |
323 /** | 323 /** |
324 * Kind of foreach over results of a statement within a context. | 324 * Kind of foreach over results of a statement within a context. |
325 */ | 325 */ |
326 protected void elements(Node parent, Element current) | 326 protected void foreach(Node parent, Element current) |
327 throws SQLException | 327 throws SQLException |
328 { | 328 { |
329 log.debug("dc:elements"); | 329 log.debug("dc:for-each"); |
330 | 330 |
331 if (connectionsStack.isEmpty()) { | 331 if (connectionsStack.isEmpty()) { |
332 log.warn("dc:elements without having results"); | 332 log.warn("dc:for-each without having results"); |
333 return; | 333 return; |
334 } | 334 } |
335 | 335 |
336 String filter = current.getAttribute("filter"); | 336 String filter = current.getAttribute("filter"); |
337 | 337 |
341 | 341 |
342 NodeList subs = current.getChildNodes(); | 342 NodeList subs = current.getChildNodes(); |
343 int S = subs.getLength(); | 343 int S = subs.getLength(); |
344 | 344 |
345 if (S == 0) { | 345 if (S == 0) { |
346 log.debug("dc:elements has no children"); | 346 log.debug("dc:for-each has no children"); |
347 return; | 347 return; |
348 } | 348 } |
349 | 349 |
350 Pair<Builder.NamedConnection, ResultData> pair = | 350 Pair<Builder.NamedConnection, ResultData> pair = |
351 connectionsStack.peek(); | 351 connectionsStack.peek(); |
715 // Simply ignore them. | 715 // Simply ignore them. |
716 } | 716 } |
717 else if ("element".equals(localName)) { | 717 else if ("element".equals(localName)) { |
718 element(parent, curr); | 718 element(parent, curr); |
719 } | 719 } |
720 else if ("elements".equals(localName)) { | 720 else if ("for-each".equals(localName)) { |
721 elements(parent, curr); | 721 foreach(parent, curr); |
722 } | 722 } |
723 else if ("filter".equals(localName)) { | 723 else if ("filter".equals(localName)) { |
724 filter(parent, curr); | 724 filter(parent, curr); |
725 } | 725 } |
726 else if ("text".equals(localName)) { | 726 else if ("text".equals(localName)) { |