if (!style.equals("041204")) //$NON-NLS-1$
throw new SAXException(Messages.getString("wrongFormat")); //$NON-NLS-1$
} else if (qName.equals("category")){ //$NON-NLS-1$
CategoryNode newcat = new CategoryNodeImpl("Nameless"); //$NON-NLS-1$
if (stack.size()==0){ // this is root
dict.setDictionaryRoot(newcat);
} else {
CategoryNode cparent = (CategoryNode)stack.peek();
try {
dict.addCategory(newcat, cparent);
} catch (DuplicateException de){
throw new SAXException(de);
}
}
stack.push(newcat);
inPattern = false;
} else if (qName.equals("pattern")){ //$NON-NLS-1$
PatternNode newpat = new PatternNodeImpl("Nameless"); //$NON-NLS-1$
CategoryNode cparent = (CategoryNode)stack.peek();
try {
dict.addPattern(newpat, cparent);
} catch (DuplicateException de){
throw new SAXException(de);
}