Oops. I misread this. However, I think it might be clearer to do something like this:

```javascript
if (node.childNodes.length == 0 ||
    node.childNodes.length >= 1 && node.firstChild.nodeType == 3) {
    if (this.extractAttributes) {
        var isAttribute = true;
        for (var i = node.childNodes.length - 1; isAttribute && i > 0 /* we already checked the first node */; i--) {
            isAttribute &= (node.childNodes[i].nodeType == 3)
        }

        if (isAttribute) {
            name = "_attribute";
        }
    }
}
else {
    name = "_geometry";
}
```