1 /*
2 * Copyright (c) 2003, 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;
23
47 * This class is responsible for scanning the declarations found
48 * in the internal and external subsets of a DTD in an XML document.
49 * The scanner acts as the sources for the DTD information which is
50 * communicated to the DTD handlers.
51 * <p>
52 * This component requires the following features and properties from the
53 * component manager that uses it:
54 * <ul>
55 * <li>http://xml.org/sax/features/validation</li>
56 * <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
57 * <li>http://apache.org/xml/properties/internal/symbol-table</li>
58 * <li>http://apache.org/xml/properties/internal/error-reporter</li>
59 * <li>http://apache.org/xml/properties/internal/entity-manager</li>
60 * </ul>
61 *
62 * @author Arnaud Le Hors, IBM
63 * @author Andy Clark, IBM
64 * @author Glenn Marcy, IBM
65 * @author Eric Ye, IBM
66 *
67 */
68 public class XMLDTDScannerImpl
69 extends XMLScanner
70 implements XMLDTDScanner, XMLComponent, XMLEntityHandler {
71
72 //
73 // Constants
74 //
75
76 // scanner states
77
78 /** Scanner state: end of input. */
79 protected static final int SCANNER_STATE_END_OF_INPUT = 0;
80
81 /** Scanner state: text declaration. */
82 protected static final int SCANNER_STATE_TEXT_DECL = 1;
83
84 /** Scanner state: markup declaration. */
85 protected static final int SCANNER_STATE_MARKUP_DECL = 2;
86
|
1 /*
2 * Copyright (c) 2003, 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;
22
46 * This class is responsible for scanning the declarations found
47 * in the internal and external subsets of a DTD in an XML document.
48 * The scanner acts as the sources for the DTD information which is
49 * communicated to the DTD handlers.
50 * <p>
51 * This component requires the following features and properties from the
52 * component manager that uses it:
53 * <ul>
54 * <li>http://xml.org/sax/features/validation</li>
55 * <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
56 * <li>http://apache.org/xml/properties/internal/symbol-table</li>
57 * <li>http://apache.org/xml/properties/internal/error-reporter</li>
58 * <li>http://apache.org/xml/properties/internal/entity-manager</li>
59 * </ul>
60 *
61 * @author Arnaud Le Hors, IBM
62 * @author Andy Clark, IBM
63 * @author Glenn Marcy, IBM
64 * @author Eric Ye, IBM
65 *
66 * @LastModified: Nov 2017
67 */
68 public class XMLDTDScannerImpl
69 extends XMLScanner
70 implements XMLDTDScanner, XMLComponent, XMLEntityHandler {
71
72 //
73 // Constants
74 //
75
76 // scanner states
77
78 /** Scanner state: end of input. */
79 protected static final int SCANNER_STATE_END_OF_INPUT = 0;
80
81 /** Scanner state: text declaration. */
82 protected static final int SCANNER_STATE_TEXT_DECL = 1;
83
84 /** Scanner state: markup declaration. */
85 protected static final int SCANNER_STATE_MARKUP_DECL = 2;
86
|