< prev index next >
src/share/classes/jdk/internal/util/xml/impl/Parser.java
Print this page
rev 13658 : 8213325: (props) Properties.loadFromXML does not fully comply with the spec
Reviewed-by: alanb, rriggs, dfuchs, naoto
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -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
@@ -2227,10 +2229,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 >