You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dl...@locus.apache.org on 2000/11/14 21:30:06 UTC
cvs commit: xml-xalan/java/src/javax/xml/transform/sax SAXResult.java SAXSource.java SAXTransformerFactory.java TemplatesHandler.java TransformerHandler.java
dleslie 00/11/14 12:30:06
Modified: java/src/javax/xml/transform/sax SAXResult.java
SAXSource.java SAXTransformerFactory.java
TemplatesHandler.java TransformerHandler.java
Log:
Javadoc update.
Revision Changes Path
1.5 +4 -4 xml-xalan/java/src/javax/xml/transform/sax/SAXResult.java
Index: SAXResult.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXResult.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SAXResult.java 2000/11/13 16:26:32 1.4
+++ SAXResult.java 2000/11/14 20:30:06 1.5
@@ -68,7 +68,7 @@
import org.xml.sax.ext.LexicalHandler;
/**
- * Acts as an holder for a transformation result tree.
+ * Acts as an holder for a transformation Result.
*/
public class SAXResult implements Result
{
@@ -99,9 +99,9 @@
}
/**
- * Get the ContentHandler that is the result target.
+ * Get the ContentHandler that is the Result.
*
- * @return The content handler that is to be target of the result output.
+ * @return The ContentHandler that is to be transformation output.
*/
public ContentHandler getHandler()
{
@@ -137,7 +137,7 @@
* Method setSystemId Set the systemID that may be used in association
* with the ContentHandler.
*
- * @param systemId The system identifier as a URL string.
+ * @param systemId The system identifier as a URI string.
*/
public void setSystemId(String systemId)
{
1.4 +25 -25 xml-xalan/java/src/javax/xml/transform/sax/SAXSource.java
Index: SAXSource.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXSource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SAXSource.java 2000/11/13 16:26:32 1.3
+++ SAXSource.java 2000/11/14 20:30:06 1.4
@@ -70,27 +70,27 @@
import org.xml.sax.InputSource;
/**
- * Acts as an holder for SAX-style Source tree input.
+ * Acts as an holder for SAX-style Source.
*/
public class SAXSource implements Source
{
/**
* Zero-argument default constructor. If this constructor
- * is used, and no other method is called, the transformer
- * will assume an empty input tree, with a default root node.
+ * is used, and no other method is called, the Transformer
+ * assumes an empty input tree, with a default root node.
*/
public SAXSource(){}
/**
- * Create a SAXSource, using an XMLReader and an InputSource.
+ * Create a SAXSource, using an XMLReader and a SAX InputSource.
* The Transformer or SAXTransformerFactory will set itself
- * to be the reader's content handler, and then will call
+ * to be the reader's ContentHandler, and then will call
* reader.parse(inputSource).
*
* @param reader An XMLReader to be used for the parse.
- * @param An input source reference that must be non-null,
- * that will be passed to the parse method of the reader.
+ * @param inputSource A SAX input source reference that must be non-null
+ * and that will be passed to the reader parse method.
*/
public SAXSource(XMLReader reader, InputSource inputSource)
{
@@ -99,15 +99,15 @@
}
/**
- * Create a SAXSource, using an InputSource.
- * The Transformer or SAXTransformerFactory will create a
+ * Create a SAXSource, using a SAX InputSource.
+ * The Transformer or SAXTransformerFactory creates a
* reader via org.xml.sax.helpers.XMLReaderFactory
- * (if setXMLReader is not used), and will set itself
- * to be the content handler of that reader, and then will call
+ * (if setXMLReader is not used), sets itself as
+ * the reader's ContentHandler, and calls
* reader.parse(inputSource).
*
- * @param inputSource An input source reference that must be non-null,
- * that will be passed to the parse method of the reader.
+ * @param inputSource An input source reference that must be non-null
+ * and that will be passed to the parse method of the reader.
*/
public SAXSource(InputSource inputSource)
{
@@ -115,7 +115,7 @@
}
/**
- * Set the XMLReader to be used for the source tree input.
+ * Set the XMLReader to be used for the Source.
*
* @param reader A valid XMLReader or XMLFilter reference.
*/
@@ -125,7 +125,7 @@
}
/**
- * Get the XMLReader to be used for the source tree input.
+ * Get the XMLReader to be used for the Source.
*
* @return A valid XMLReader or XMLFilter reference, or null.
*/
@@ -135,7 +135,7 @@
}
/**
- * Set the InputSource to be used for the source tree input.
+ * Set the SAX InputSource to be used for the Source.
*
* @param inputSource A valid InputSource reference.
*/
@@ -145,7 +145,7 @@
}
/**
- * Get the InputSource to be used for the source tree input.
+ * Get the SAX InputSource to be used for the Source.
*
* @return A valid InputSource reference, or null.
*/
@@ -162,9 +162,9 @@
* since the application can use it to resolve relative URIs
* and can include it in error messages and warnings (the parser
* will attempt to open a connection to the URI only if
- * there is no byte stream or character stream specified).</p>
+ * no byte stream or character stream is specified).</p>
*
- * @param systemId The system identifier as a URL string.
+ * @param systemId The system identifier as a URI string.
*/
public void setSystemId(String systemId)
{
@@ -177,29 +177,29 @@
}
/**
- * Get the base ID (URL or system ID) from where URLs
+ * Get the base ID (URI or system ID) from where URIs
* will be resolved.
*
- * @return Base URL for the source tree, or null.
+ * @return Base URL for the Source, or null.
*/
public String getSystemId()
{
return (null != inputSource) ? inputSource.getSystemId() : null;
}
- /** The XMLReader to be used for the source tree input. OK if null. */
+ /** The XMLReader to be used for the source tree input. May be null. */
private XMLReader reader;
- /** The InputSource to be used for the source tree input. Should not be null. */
+ /** The SAX InputSource to be used for the source tree input. Should not be null. */
private InputSource inputSource;
/**
- * Try and obtain a SAX InputSource object from a TrAX Source
+ * Attempt to obtain a SAX InputSource object from a TrAX Source
* object.
*
* @param source Must be a non-null Source reference.
*
- * @return An InputSource, or null if source can not be converted.
+ * @return An InputSource, or null if Source can not be converted.
*/
public static InputSource sourceToInputSource(Source source)
{
1.6 +17 -17 xml-xalan/java/src/javax/xml/transform/sax/SAXTransformerFactory.java
Index: SAXTransformerFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/SAXTransformerFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SAXTransformerFactory.java 2000/11/14 16:40:42 1.5
+++ SAXTransformerFactory.java 2000/11/14 20:30:06 1.6
@@ -66,21 +66,20 @@
import org.xml.sax.XMLFilter;
/**
- * This class extends TransformerFactory to provide SAX specific
+ * This class extends TransformerFactory to provide SAX-specific
* factory methods. It provides two types of ContentHandlers,
* one for creating Transformers, the other for creating Templates
* objects.
*
- * <p>If applications need to set the ErrorHandler or EntityResolver
- * for XMLReaders created during the course of a transform, it can
- * do so by setting a URIResolver that returns SAXSource that holds
- * an application created XMLReader, which the user can customize
- * by setting an error handler and entity resolver.</p>
+ * <p>If an application wants to set the ErrorHandler or EntityResolver
+ * for an XMLReader used during a transformation, it should use a URIResolver
+ * to return the SAXSource which provides (with getXMLReader) a reference to
+ * the XMLReader.</p>
*/
public abstract class SAXTransformerFactory extends TransformerFactory
{
/**
- * Default constructor is protected on purpose.
+ * The default constructor is protected on purpose.
*/
protected SAXTransformerFactory(){}
@@ -89,7 +88,7 @@
* ContentHandler events into a Result, based on the transformation
* instructions specified by the argument.
*
- * @param src The source of the transformation instructions.
+ * @param src The Source of the transformation instructions.
*
* @return TransformerHandler ready to transform SAX events.
*
@@ -103,7 +102,7 @@
* Get a TransformerHandler object that can process SAX
* ContentHandler events into a Result, based on the Templates argument.
*
- * @param templates The source of the transformation instructions.
+ * @param templates The compiled transformation instructions.
*
* @return TransformerHandler ready to transform SAX events.
*
@@ -116,13 +115,14 @@
/**
* Get a TransformerHandler object that can process SAX
* ContentHandler events into a Result. The transformation
- * is defined as an identity (or copy) transformation.
+ * is defined as an identity (or copy) transformation, for example
+ * to copy a series of SAX parse events into a DOM tree.
*
* @return A non-null reference to a TransformerHandler, that may
* be used as a ContentHandler for SAX parse events.
*
* @throws TransformerConfigurationException If for some reason the
- * TransformerHandler can not be created.
+ * TransformerHandler cannot be created.
*/
public abstract TransformerHandler newTransformerHandler()
throws TransformerConfigurationException;
@@ -135,21 +135,21 @@
* be used as a ContentHandler for SAX parse events.
*
* @throws TransformerConfigurationException If for some reason the
- * TemplatesHandler can not be created.
+ * TemplatesHandler cannot be created.
*/
public abstract TemplatesHandler newTemplatesHandler()
throws TransformerConfigurationException;
/**
- * Create an XMLFilter that uses the given source as the
+ * Create an XMLFilter that uses the given Source as the
* transformation instructions.
*
- * @param src The source of the transformation instructions.
+ * @param src The Source of the transformation instructions.
*
* @return An XMLFilter object, or null if this feature is not supported.
*
* @throws TransformerConfigurationException If for some reason the
- * TemplatesHandler can not be created.
+ * TemplatesHandler cannot be created.
*/
public abstract XMLFilter newXMLFilter(Source src)
throws TransformerConfigurationException;
@@ -157,12 +157,12 @@
/**
* Create an XMLFilter, based on the Templates argument..
*
- * @param templates The source of the transformation instructions.
+ * @param templates The compiled transformation instructions.
*
* @return An XMLFilter object, or null if this feature is not supported.
*
* @throws TransformerConfigurationException If for some reason the
- * TemplatesHandler can not be created.
+ * TemplatesHandler cannot be created.
*/
public abstract XMLFilter newXMLFilter(Templates templates)
throws TransformerConfigurationException;
1.3 +11 -12 xml-xalan/java/src/javax/xml/transform/sax/TemplatesHandler.java
Index: TemplatesHandler.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/TemplatesHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TemplatesHandler.java 2000/11/13 16:26:32 1.2
+++ TemplatesHandler.java 2000/11/14 20:30:06 1.3
@@ -62,32 +62,31 @@
import org.xml.sax.ext.LexicalHandler;
/**
- * This is a SAX ContentHandler that may be used to process SAX
- * parse events into an Templates objects.
+ * A SAX ContentHandler that may be used to process SAX
+ * parse events (parsing transformation instructions) into a Templates object.
*
- * <p>Note that TemplatesHandler doesn't need to implement LexicalHandler.</p>
+ * <p>Note that TemplatesHandler does not need to implement LexicalHandler.</p>
*/
public interface TemplatesHandler extends ContentHandler
{
/**
- * When this object is used as a ContentHandler or DocumentHandler, it
- * creates a Templates object, which the caller can get once
- * the SAX events have been completed.
+ * When a TemplatesHandler object is used as a ContentHandler or DocumentHandler
+ * for the parsing of transformation instructions, it creates a Templates object,
+ * which the caller can get once the SAX events have been completed.
*
- * @return The stylesheet object that was created during
- * the SAX event process, or null if no stylesheet has
+ * @return The Templates object that was created during
+ * the SAX event process, or null if no Templates object has
* been created.
*
- * @version Alpha
* @author <a href="mailto:scott_boag@lotus.com">Scott Boag</a>
*/
public Templates getTemplates();
/**
- * Set the base ID (URL or system ID) for the stylesheet
+ * Set the base ID (URI or system ID) for the Templates object
* created by this builder. This must be set in order to
- * resolve relative URLs in the stylesheet.
- * @param baseID Base URL for this stylesheet.
+ * resolve relative URIs in the stylesheet.
+ * @param baseID Base URI for this stylesheet.
*/
public void setSystemID(String systemID);
}
1.3 +6 -6 xml-xalan/java/src/javax/xml/transform/sax/TransformerHandler.java
Index: TransformerHandler.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/javax/xml/transform/sax/TransformerHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TransformerHandler.java 2000/11/13 16:26:32 1.2
+++ TransformerHandler.java 2000/11/14 20:30:06 1.3
@@ -12,16 +12,16 @@
/**
* The SAXTransformerFactory provides a reference to an
- * object, which implements this interface, and which can
- * listen to SAX ContentHandler parse events, and transform
+ * object that implements this interface, and that can
+ * listen to SAX ContentHandler parse events and transform
* them to a Result.
*/
public interface TransformerHandler
extends ContentHandler, LexicalHandler
{
/**
- * Method setResult allows the user of the TransformerHandler
- * to set the result of the transform.
+ * Enables the user of the TransformerHandler to set the
+ * to set the Result for the transformation.
*
* @param result A Result instance, should not be null.
*
@@ -31,9 +31,9 @@
throws IllegalArgumentException;
/**
- * Set the base ID (URL or system ID) from where relative
+ * Set the base ID (URI or system ID) from where relative
* URLs will be resolved.
- * @param baseID Base URL for the source tree.
+ * @param baseID Base URI for the source tree.
*/
public void setBaseID(String baseID);