break;
}
}
if (fragments.size() == 0 || fragments.size() == 1 && fragments.get(0) instanceof StaticFragment) {
element = new SimpleAttribute(currentToken.getLineNo(), currentToken.getColumn());
((SimpleAttribute) element).setValue(currentToken.value);
} else {
element = new ComplexAttribute(currentToken.getLineNo(), currentToken.getColumn());
((ComplexAttribute) element).setFragments(fragments);
AttributeValueToken aTok = (AttributeValueToken) currentToken;
if (aTok.getQuotes() == -2) {
((ComplexAttribute) element).setQuote('"');
} else if (aTok.getQuotes() == -3) {
((ComplexAttribute) element).setQuote('\'');
}
}
exitLoop = true;
break;
}
if (exitLoop) break;
}
if (element == null) {
if (tok != null) {
element = new SimpleAttribute(tok.getAttributeName(), tok.getNameSpace(), tok.getLineNo(), tok.getLineNo());
} else {
throw new TemplateParsingException("Error parsing template file. Unterminated tag?", currentToken.getLineNo(), currentToken.getColumn());
}
}