Esempio n. 1
0
 public void startElement(String uri, String localName,
                          String qName, Attributes attributes)
         throws SAXException {
   super.startElement(uri, localName, qName, attributes);
   xmlBaseHandler.startElement();
   String xmlBase = attributes.getValue(WellKnownNamespaces.XML, "base");
   if (xmlBase != null)
     xmlBaseHandler.xmlBaseAttribute(xmlBase);
   if (!MNS_URI.equals(uri) || foreignDepth > 0) {
     foreignDepth++;
     return;
   }
   if (ceh.getHadErrorOrFatalError())
     return;
   if (localName.equals("rules"))
     parseRules(attributes);
   else if (localName.equals("cover"))
     parseCover(attributes);
   else if (localName.equals("context"))
     parseContext(attributes);
   else if (localName.equals("root"))
     parseRoot(attributes);
   else if (localName.equals("element"))
     parseElement(attributes);
   else if (localName.equals("lax"))
     parseLax(attributes);
   else
     parseValidate(localName.equals("validateAttributes"), attributes);
 }
Esempio n. 2
0
 public void endElement(String namespaceURI, String localName,
                        String qName)
         throws SAXException {
   super.endElement(namespaceURI, localName, qName);
   xmlBaseHandler.endElement();
   if (foreignDepth > 0) {
     foreignDepth--;
     return;
   }
  if (pathDepth > 0) {
     pathDepth--;
     if (pathDepth == 0)
       endPath();
   }
 }