ITextRegionList regions = taglibFlatNode.getRegions();
String prefix = null;
boolean prefixname = false;
try {
for (int i = 0; i < regions.size(); i++) {
ITextRegion region = regions.get(i);
if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) {
int offset = taglibFlatNode.getStartOffset(region);
int length = region.getTextLength();
prefixname = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.PREFIX);
}
else {
// old fashioned way
prefixname = (getText(taglibFlatNode.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.PREFIX));
}
}
else if (prefixname && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
prefix = getText(taglibFlatNode.getStartOffset(region), region.getTextLength());
}
}
}
catch (StringIndexOutOfBoundsException sioobExc) {
// nothing to be done