*
* @param reader
* @return initialized document
*/
public SrxDocument parse(Reader reader) {
Srx srx = (Srx) bind.unmarshal(reader);
SrxDocument document = new SrxDocument();
document.setCascade("yes".equals(srx.getHeader().getCascade()));
Body body = srx.getBody();
Map<String, LanguageRule> languageRuleMap = new HashMap<String, LanguageRule>();
for (Languagerule lr : body.getLanguagerules().getLanguagerule()) {
LanguageRule languageRule = new LanguageRule(lr
.getLanguagerulename());