xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From santiag...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
Date Wed, 28 Aug 2002 20:23:23 GMT
santiagopg    2002/08/28 13:23:23

  Modified:    java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
  Log:
  Keep track of parameters for built-in identity transform (needed for
  some TCK tests).
  
  Revision  Changes    Path
  1.57      +29 -4     xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- TransformerImpl.java	27 Aug 2002 16:48:25 -0000	1.56
  +++ TransformerImpl.java	28 Aug 2002 20:23:22 -0000	1.57
  @@ -182,6 +182,13 @@
        */
       private boolean _isIdentity = false;
   
  +    /**
  +     * A hashtable to store parameters for the identity transform. These
  +     * are not needed during the transformation, but we must keep track of 
  +     * them to be fully complaint with the JAXP API.
  +     */
  +    private Hashtable _parameters = null;
  +
       protected TransformerImpl(Properties outputProperties, int indentNumber, 
   	TransformerFactoryImpl tfactory) 
       {
  @@ -1010,7 +1017,15 @@
        * @param value The value to assign to the parameter
        */
       public void setParameter(String name, Object value) { 
  -	_translet.addParameter(name, value, false);
  +	if (_isIdentity) {
  +	    if (_parameters == null) {
  +		_parameters = new Hashtable();
  +	    }
  +	    _parameters.put(name, value);
  +	}
  +	else {
  +	    _translet.addParameter(name, value, false);
  +	}
       }
   
       /**
  @@ -1019,7 +1034,12 @@
        * parameter stack.
        */
       public void clearParameters() {  
  -	_translet.clearParameters();
  +	if (_isIdentity && _parameters != null) {
  +	    _parameters.clear();
  +	}
  +	else {
  +	    _translet.clearParameters();
  +	}
       }
   
       /**
  @@ -1031,7 +1051,12 @@
        * @return An object that contains the value assigned to the parameter
        */
       public final Object getParameter(String name) {
  -	return(_translet.getParameter(name));
  +	if (_isIdentity) {
  +	    return (_parameters != null) ? _parameters.get(name) : null;
  +	}
  +	else {
  +	    return _translet.getParameter(name);
  +	}
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message