2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
18
package org.apache.xerces.xinclude;
20
import java.io.IOException;
22
import org.apache.xerces.util.XML11Char;
23
import org.apache.xerces.xni.parser.XMLInputSource;
26
* This class is used for reading resources requested in <include> elements in
27
* XML 1.1 entities, when the parse attribute of the <include> element is "text".
28
* Using this class will open the location, detect the encoding, and discard the
29
* byte order mark, if applicable.
31
* @author Michael Glavassevich, IBM
33
* @version $Id: XInclude11TextReader.java,v 1.2 2009/12/10 03:18:45 matthewoliver Exp $
35
* @see XIncludeHandler
37
public class XInclude11TextReader
38
extends XIncludeTextReader {
41
* Construct the XIncludeReader using the XMLInputSource and XIncludeHandler.
43
* @param source The XMLInputSource to use.
44
* @param handler The XIncludeHandler to use.
45
* @param bufferSize The size of this text reader's buffer.
47
public XInclude11TextReader(XMLInputSource source, XIncludeHandler handler, int bufferSize)
49
super(source, handler, bufferSize);
53
* Returns true if the specified character is a valid XML character
54
* as per the rules of XML 1.1.
56
* @param ch The character to check.
58
protected boolean isValid(int ch) {
59
return XML11Char.isXML11Valid(ch);