< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Nov 2017
   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 
  22 package com.sun.org.apache.xerces.internal.impl.dtd;
  23 


  55  * The DTD processor. The processor implements a DTD
  56  * filter: receiving DTD events from the DTD scanner; validating
  57  * the content and structure; building a grammar, if applicable;
  58  * and notifying the DTDHandler of the information resulting from the
  59  * process.
  60  * <p>
  61  * This component requires the following features and properties from the
  62  * component manager that uses it:
  63  * <ul>
  64  *  <li>http://xml.org/sax/features/namespaces</li>
  65  *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
  66  *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
  67  *  <li>http://apache.org/xml/properties/internal/grammar-pool</li>
  68  *  <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
  69  * </ul>
  70  *
  71  * @xerces.internal
  72  *
  73  * @author Neil Graham, IBM
  74  *

  75  */
  76 public class XMLDTDProcessor
  77         implements XMLComponent, XMLDTDFilter, XMLDTDContentModelFilter {
  78 
  79     //
  80     // Constants
  81     //
  82 
  83     /** Top level scope (-1). */
  84     private static final int TOP_LEVEL_SCOPE = -1;
  85 
  86     // feature identifiers
  87 
  88     /** Feature identifier: validation. */
  89     protected static final String VALIDATION =
  90         Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
  91 
  92     /** Feature identifier: notify character references. */
  93     protected static final String NOTIFY_CHAR_REFS =
  94         Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.dtd;
  22 


  54  * The DTD processor. The processor implements a DTD
  55  * filter: receiving DTD events from the DTD scanner; validating
  56  * the content and structure; building a grammar, if applicable;
  57  * and notifying the DTDHandler of the information resulting from the
  58  * process.
  59  * <p>
  60  * This component requires the following features and properties from the
  61  * component manager that uses it:
  62  * <ul>
  63  *  <li>http://xml.org/sax/features/namespaces</li>
  64  *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
  65  *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
  66  *  <li>http://apache.org/xml/properties/internal/grammar-pool</li>
  67  *  <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
  68  * </ul>
  69  *
  70  * @xerces.internal
  71  *
  72  * @author Neil Graham, IBM
  73  *
  74  * @LastModified: Nov 2017
  75  */
  76 public class XMLDTDProcessor
  77         implements XMLComponent, XMLDTDFilter, XMLDTDContentModelFilter {
  78 
  79     //
  80     // Constants
  81     //
  82 
  83     /** Top level scope (-1). */
  84     private static final int TOP_LEVEL_SCOPE = -1;
  85 
  86     // feature identifiers
  87 
  88     /** Feature identifier: validation. */
  89     protected static final String VALIDATION =
  90         Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
  91 
  92     /** Feature identifier: notify character references. */
  93     protected static final String NOTIFY_CHAR_REFS =
  94         Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;


< prev index next >