You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/08/07 23:36:10 UTC

cvs commit: xml-xalan/java/src/trax Processor.java

sboag       00/08/07 14:36:10

  Modified:    java/src/trax Processor.java
  Log:
  Add processFromNode(Node node, String systemID)
  , also set/getEntityResolver.
  
  Revision  Changes    Path
  1.3       +51 -0     xml-xalan/java/src/trax/Processor.java
  
  Index: Processor.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/trax/Processor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Processor.java	2000/07/18 01:27:41	1.2
  +++ Processor.java	2000/08/07 21:36:09	1.3
  @@ -15,6 +15,7 @@
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.XMLReader;
   import org.xml.sax.ErrorHandler;
  +import org.xml.sax.EntityResolver;
   import org.w3c.dom.Node;
   
   /**
  @@ -179,6 +180,20 @@
       throws ProcessorException;
   
     /**
  +   * Process the stylesheet from a DOM tree, if the 
  +   * processor supports the "http://xml.org/trax/features/dom/input" 
  +   * feature.    
  +   * 
  +   * @param node A DOM tree which must contain 
  +   * valid transform instructions that this processor understands.
  +   * @param systemID The systemID from where xsl:includes and xsl:imports 
  +   * should be resolved from.
  +   * @returns A Templates object capable of being used for transformation purposes.
  +   */
  +  public abstract Templates processFromNode(Node node, String systemID)
  +    throws ProcessorException;
  +
  +  /**
      * Process a series of inputs, treating them in import or cascade 
      * order.  This is mainly for support of the getAssociatedStylesheets
      * method, but may be useful for other purposes.
  @@ -386,5 +401,41 @@
     {
       return errorHandler;
     }
  +  
  +  private EntityResolver entityResolver;
  +  
  +  /**
  +   * Allow an application to register an entity resolver.
  +   *
  +   * <p>If the application does not register an entity resolver,
  +   * the XMLReader will perform its own default resolution.</p>
  +   *
  +   * <p>Applications may register a new or different resolver in the
  +   * middle of a parse, and the SAX parser must begin using the new
  +   * resolver immediately.</p>
  +   *
  +   * @param resolver The entity resolver.
  +   * @exception java.lang.NullPointerException If the resolver 
  +   *            argument is null.
  +   * @see #getEntityResolver
  +   */
  +  public void setEntityResolver (EntityResolver resolver)
  +  {
  +    entityResolver = resolver;
  +  }
  +
  +
  +  /**
  +   * Return the current entity resolver.
  +   *
  +   * @return The current entity resolver, or null if none
  +   *         has been registered.
  +   * @see #setEntityResolver
  +   */
  +  public EntityResolver getEntityResolver ()
  +  {
  +    return entityResolver;
  +  }
  +
   
   }