* formatting constraints
*
* @return formatting constraints defined by an ancestor
*/
private XMLFormattingConstraints getRegionConstraints(IDOMNode currentNode) {
IDOMNode iterator = currentNode;
XMLFormattingConstraints result = new XMLFormattingConstraints();
DOMRegion region = new DOMRegion();
XMLFormattingConstraints parentConstraints = new XMLFormattingConstraints();
boolean parent = true;
/* Iterate through the ancestry to find if any explicit whitespace strategy has
* been defined
*/
while(iterator != null && iterator.getNodeType() != Node.DOCUMENT_NODE) {
iterator = (IDOMNode) iterator.getParentNode();
region.domNode = iterator;
region.documentRegion = iterator.getFirstStructuredDocumentRegion();
updateFormattingConstraints(null, null, result, region);
/* If this is the parent of the current node, keep the constraints
* in case no other constraints are identified