jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
changeset 25591 8382d4909d6a
parent 25264 040625ce9b72
equal deleted inserted replaced
25590:fe5f84c49b8e 25591:8382d4909d6a
  1306 
  1306 
  1307         fEmptyElement = false;
  1307         fEmptyElement = false;
  1308 
  1308 
  1309         fAttributes.removeAllAttributes();
  1309         fAttributes.removeAllAttributes();
  1310 
  1310 
       
  1311         checkDepth(rawname);
  1311         if(!seekCloseOfStartTag()){
  1312         if(!seekCloseOfStartTag()){
  1312             fReadingAttributes = true;
  1313             fReadingAttributes = true;
  1313             fAttributeCacheUsedCount =0;
  1314             fAttributeCacheUsedCount =0;
  1314             fStringBufferIndex =0;
  1315             fStringBufferIndex =0;
  1315             fAddDefaultAttr = true;
  1316             fAddDefaultAttr = true;
  1908         //setScannerState(SCANNER_STATE_CONTENT);
  1909         //setScannerState(SCANNER_STATE_CONTENT);
  1909         //return true ;
  1910         //return true ;
  1910     } // scanEntityReference()
  1911     } // scanEntityReference()
  1911 
  1912 
  1912     // utility methods
  1913     // utility methods
       
  1914 
       
  1915     /**
       
  1916      * Check if the depth exceeds the maxElementDepth limit
       
  1917      * @param elementName name of the current element
       
  1918      */
       
  1919     void checkDepth(String elementName) {
       
  1920         fLimitAnalyzer.addValue(Limit.MAX_ELEMENT_DEPTH_LIMIT, elementName, fElementStack.fDepth);
       
  1921         if (fSecurityManager.isOverLimit(Limit.MAX_ELEMENT_DEPTH_LIMIT,fLimitAnalyzer)) {
       
  1922             fSecurityManager.debugPrint(fLimitAnalyzer);
       
  1923             reportFatalError("MaxElementDepthLimit", new Object[]{elementName,
       
  1924                 fLimitAnalyzer.getTotalValue(Limit.MAX_ELEMENT_DEPTH_LIMIT),
       
  1925                 fSecurityManager.getLimit(Limit.MAX_ELEMENT_DEPTH_LIMIT),
       
  1926                 "maxElementDepth"});
       
  1927         }
       
  1928     }
  1913 
  1929 
  1914     /**
  1930     /**
  1915      * Calls document handler with a single character resulting from
  1931      * Calls document handler with a single character resulting from
  1916      * built-in entity resolution.
  1932      * built-in entity resolution.
  1917      *
  1933      *