286N/A * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. 286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A * <p>Acts as an holder for SAX-style Source.</p> 286N/A * <p>Note that XSLT requires namespace support. Attempting to transform an 286N/A * input source that is not 286N/A * generated with a namespace-aware parser may result in errors. 286N/A * Parsers can be made namespace aware by calling the 286N/A * {@link javax.xml.parsers.SAXParserFactory#setNamespaceAware(boolean awareness)} method.</p> 286N/A * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a> 286N/A * returns true when passed this value as an argument, 286N/A * the Transformer supports Source input of this type. 286N/A * <p>Zero-argument default constructor. If this constructor is used, and 286N/A * no SAX source is set using 286N/A * {@link #setInputSource(InputSource inputSource)} , then the 286N/A * <code>Transformer</code> will 286N/A * create an empty source {@link org.xml.sax.InputSource} using 286N/A * {@link org.xml.sax.InputSource#InputSource() new InputSource()}.</p> 286N/A * @see javax.xml.transform.Transformer#transform(Source xmlSource, Result outputTarget) 286N/A * and a SAX InputSource. The {@link javax.xml.transform.Transformer} 286N/A * or {@link javax.xml.transform.sax.SAXTransformerFactory} will set itself 286N/A * to be the reader's {@link org.xml.sax.ContentHandler}, and then will call 286N/A * reader.parse(inputSource). 286N/A * @param reader An XMLReader to be used for the parse. 286N/A * @param inputSource A SAX input source reference that must be non-null 286N/A * and that will be passed to the reader parse method. 286N/A * Create a <code>SAXSource</code>, using a SAX <code>InputSource</code>. 286N/A * (if setXMLReader is not used), sets itself as 286N/A * the reader's {@link org.xml.sax.ContentHandler}, and calls 286N/A * reader.parse(inputSource). 286N/A * @param inputSource An input source reference that must be non-null 286N/A * and that will be passed to the parse method of the reader. 286N/A * Set the XMLReader to be used for the Source. 286N/A * @param reader A valid XMLReader or XMLFilter reference. 286N/A * Get the XMLReader to be used for the Source. 286N/A * @return A valid XMLReader or XMLFilter reference, or null. 286N/A * Set the SAX InputSource to be used for the Source. 286N/A * @param inputSource A valid InputSource reference. 286N/A * Get the SAX InputSource to be used for the Source. 286N/A * @return A valid InputSource reference, or null. 286N/A * Set the system identifier for this Source. If an input source 286N/A * has already been set, it will set the system ID or that 286N/A * input source, otherwise it will create a new input source. 286N/A * <p>The system identifier is optional if there is a byte stream 286N/A * or a character stream, but it is still useful to provide one, 286N/A * since the application can use it to resolve relative URIs 286N/A * and can include it in error messages and warnings (the parser 286N/A * will attempt to open a connection to the URI only if 286N/A * no byte stream or character stream is specified).</p> 286N/A * @param systemId The system identifier as a URI string. 286N/A * <p>Get the base ID (URI or system ID) from where URIs 286N/A * will be resolved.</p> 286N/A * @return Base URL for the <code>Source</code>, or <code>null</code>. 286N/A * The XMLReader to be used for the source tree input. May be null. 286N/A * <p>The SAX InputSource to be used for the source tree input. 286N/A * Should not be <code>null</code>.</p> 286N/A * Attempt to obtain a SAX InputSource object from a Source 286N/A * @param source Must be a non-null Source reference. 286N/A * @return An InputSource, or null if Source can not be converted.