1 // Copyright 2004, 2018 Elliotte Rusty Harold
2 //
3 // This library is free software; you can redistribute
4 // it and/or modify it under the terms of version 2.1 of
5 // the GNU Lesser General Public License as published by
6 // the Free Software Foundation.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General
14 // Public License along with this library; if not, write to the
15 // Free Software Foundation, Inc., 59 Temple Place, Suite 330,
16 // Boston, MA  02111-1307  USA
17 //
18 // You can contact Elliotte Rusty Harold by sending e-mail to
19 // elharo@ibiblio.org. Please include the word "XOM" in the
20 // subject line. The XOM home page is temporarily located at
21 // http://www.cafeconleche.org/XOM/  but will eventually move
22 // to http://www.xom.nu/
23 
24 package nu.xom;
25 
26 import org.xml.sax.SAXException;
27 
28 import com.sun.org.apache.xerces.internal.parsers.SAXParser;
29 import com.sun.org.apache.xerces.internal.parsers.DTDConfiguration;
30 import com.sun.org.apache.xerces.internal.impl.Constants
31 ;
32 /**
33  * <p>
34  * This class is used by the <code>Builder</code> to prevent the
35  * repackaged Xerces shipped with Java 1.5 and some of the JAXP
36  * reference implementations from accepting XML 1.1 documents.
37  * </p>
38  *
39  * @author Elliotte Rusty Harold
40  * @version 1.2.11
41  *
42  */
43 class JDK15XML1_0Parser extends SAXParser {
44 
JDK15XML1_0Parser()45     JDK15XML1_0Parser() throws SAXException {
46 
47         super(new DTDConfiguration());
48         // workaround for Java 1.5 beta 2 bugs
49         com.sun.org.apache.xerces.internal.util.SecurityManager manager
50           = new com.sun.org.apache.xerces.internal.util.SecurityManager();
51         setProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY, manager);
52 
53     }
54 
55 }
56