1/* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5/* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22package com.sun.org.apache.xerces.internal.impl.dtd; 23 24import com.sun.org.apache.xerces.internal.impl.Constants; 25import com.sun.org.apache.xerces.internal.impl.XML11DTDScannerImpl; 26import com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl; 27import com.sun.org.apache.xerces.internal.impl.XMLEntityManager; 28import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; 29import com.sun.org.apache.xerces.internal.util.SymbolTable; 30import com.sun.org.apache.xerces.internal.util.XML11Char; 31import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; 32import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver; 33 34/** 35 * This class extends XMLDTDProcessor by giving it 36 * the ability to parse XML 1.1 documents correctly. It can also be used 37 * as a DTD loader, so that XML 1.1 external subsets can 38 * be processed correctly (hence it's rather anomalous-appearing 39 * derivation from XMLDTDLoader). 40 * 41 * @xerces.internal 42 * 43 * @author Neil Graham, IBM 44 * 45 */ 46public class XML11DTDProcessor extends XMLDTDLoader{ 47 48 // constructors 49 50 public XML11DTDProcessor() { 51 super(); 52 } // <init>() 53 54 public XML11DTDProcessor(SymbolTable symbolTable) { 55 super(symbolTable); 56 } // init(SymbolTable) 57 58 public XML11DTDProcessor(SymbolTable symbolTable, 59 XMLGrammarPool grammarPool) { 60 super(symbolTable, grammarPool); 61 } // init(SymbolTable, XMLGrammarPool) 62 63 XML11DTDProcessor(SymbolTable symbolTable, 64 XMLGrammarPool grammarPool, XMLErrorReporter errorReporter, 65 XMLEntityResolver entityResolver) { 66 super(symbolTable, grammarPool, errorReporter, entityResolver); 67 } // init(SymbolTable, XMLGrammarPool, XMLErrorReporter, XMLEntityResolver) 68 69 // overridden methods 70 71 protected boolean isValidNmtoken(String nmtoken) { 72 return XML11Char.isXML11ValidNmtoken(nmtoken); 73 } // isValidNmtoken(String): boolean 74 75 protected boolean isValidName(String name) { 76 return XML11Char.isXML11ValidName(name); 77 } // isValidNmtoken(String): boolean 78 79 protected XMLDTDScannerImpl createDTDScanner(SymbolTable symbolTable, 80 XMLErrorReporter errorReporter, XMLEntityManager entityManager) { 81 return new XML11DTDScannerImpl(symbolTable, errorReporter, entityManager); 82 } // createDTDScanner(SymbolTable, XMLErrorReporter, XMLEntityManager) : XMLDTDScannerImpl 83 84 protected short getScannerVersion() { 85 return Constants.XML_VERSION_1_1; 86 } // getScannerVersion() : short 87 88} // class XML11DTDProcessor 89