< prev index next >

src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java

Print this page

        

@@ -648,10 +648,12 @@
      *
      * @exception Exception is parser specific exception form panic method.
      * @exception IOException
      */
     private void dtdsub() throws Exception {
+        startInternalSub(); // reports the event before parsing the subset
+
         char ch;
         for (short st = 0; st >= 0;) {
             ch = getch();
             switch (st) {
                 case 0:     // skip white spaces before a declaration

@@ -2229,10 +2231,17 @@
      */
     protected abstract void docType(String name, String pubid, String sysid)
             throws SAXException;
 
     /**
+     * Reports the start of DTD internal subset.
+     *
+     * @throws SAXException if the receiver throws SAXException
+     */
+    public abstract void startInternalSub ()  throws SAXException;
+
+    /**
      * Reports a comment.
      *
      * @param text The comment text starting from first charcater.
      * @param length The number of characters in comment.
      */
< prev index next >