fixed extension 2 and boolean to determine if patternnode is attribute