//Ϊ���е�ÿһ��ģʽ����������ԣ�����ģʽ��������������
Iterator patternIteratorAgain = patternList.getChildren().iterator();
while (patternIteratorAgain.hasNext()) {
Element patternElement = (Element) patternIteratorAgain.next();
Pattern pattern = patternBase.getPattern(patternElement.getAttributeValue("name"));
String description = patternElement.getChild("description", pbd).getTextNormalize();
description = _decode(description);
pattern.setDescription(description);
Element parent = patternElement.getChild("parent", pbd);
if (parent != null) {
Pattern parentPattern = patternBase.getPattern(parent.getAttributeValue("name"));
pattern.setParentPattern(parentPattern);
}
Element childrenList = patternElement.getChild("childrenList", pbd);
Element childrenPatternList = childrenList.getChild("childPatternList", pbd);
Element childrenTempleteList = childrenList.getChild("childTempleteList", pbd);
if (childrenPatternList != null) {
Iterator childrenPatternIterator = childrenPatternList.getChildren().iterator();
while (childrenPatternIterator.hasNext()) {
Element childPatternElement = (Element) childrenPatternIterator.next();
Pattern childPattern = patternBase.getPattern(childPatternElement.getAttributeValue("name"));
pattern.addChildPattern(childPattern);
}
}
if (childrenTempleteList != null) {
Iterator childrenTempleteIterator = childrenTempleteList.getChildren().iterator();
while (childrenTempleteIterator.hasNext()) {
Element childTempleteElement = (Element) childrenTempleteIterator.next();
Templete childTemplete = patternBase.getTemplete(childTempleteElement.getAttributeValue("name"));
pattern.addChildTemplete(childTemplete);
}
}
}
Iterator templeteIteratorAgain = templeteList.getChildren().iterator();
while (templeteIteratorAgain.hasNext()) {
Element templeteElement = (Element) templeteIteratorAgain.next();
Templete templete = patternBase.getTemplete(templeteElement.getAttributeValue("name"));
Element parent = templeteElement.getChild("parent", pbd);
if (parent.getAttributeValue("type") == "templete") {
Templete parentTemplete = patternBase.getTemplete(parent.getAttributeValue("name"));
templete.setParentTemplete(parentTemplete);
} else {
Pattern parentPattern = patternBase.getPattern(parent.getAttributeValue("name"));
templete.setParentPattern(parentPattern);
}
Element childList = templeteElement.getChild("childTempleteList", pbd);
if (childList != null) {