ListIterator<Fragment> iter = struct.getFragments().listIterator();
assert iter.hasNext();
while (iter.hasNext()) {
Fragment fragment = iter.next();
if (PrkElement.COMPONENT.name.equals(fragment.prkKey)) {
PrkComponent comp = new PrkComponent();
comp.setType(fragment.prkValue);
for (String key : fragment.attributes().keySet()) {
comp.putAttr(key, fragment.attributes().get(key));
}
template.add(comp);
text.delete(fragment.offset, text.length());
continue;
}