morten      01/11/08 07:08:06

  Modified:    java/src/org/apache/xalan/xsltc/compiler Parser.java
               java/src/org/apache/xalan/xsltc/trax
                        TransformerFactoryImpl.java
  Log:
  Added a "debug" attribute to the TransformerFactory implementation.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.34      +2 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Parser.java       2001/11/08 10:23:39     1.33
  +++ Parser.java       2001/11/08 15:08:06     1.34
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Parser.java,v 1.33 2001/11/08 10:23:39 morten Exp $
  + * @(#)$Id: Parser.java,v 1.34 2001/11/08 15:08:06 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -780,7 +780,7 @@
   
        // Unary minus.
        _symbolTable.addPrimop("u-", R_R);      
  -     _symbolTable.addPrimop("u-", I_I);      
  +     _symbolTable.addPrimop("u-", I_I);
       }
   
       public SymbolTable getSymbolTable() {
  
  
  
  1.30      +15 -5     
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TransformerFactoryImpl.java       2001/11/08 14:11:15     1.29
  +++ TransformerFactoryImpl.java       2001/11/08 15:08:06     1.30
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerFactoryImpl.java,v 1.29 2001/11/08 14:11:15 morten 
Exp $
  + * @(#)$Id: TransformerFactoryImpl.java,v 1.30 2001/11/08 15:08:06 morten 
Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -140,6 +140,8 @@
        }
       }
   
  +    // This flag is passed to the compiler - will produce stack traces etc.
  +    private boolean _debug = false;
   
       /**
        * javax.xml.transform.sax.TransformerFactory implementation.
  @@ -207,11 +209,17 @@
        throws IllegalArgumentException { 
        // Set the default translet name (ie. class name), which will be used
        // for translets that cannot be given a name from their system-id.
  -     if ((name.equals("translet-name")) && (value instanceof String))
  +     if ((name.equals("translet-name")) && (value instanceof String)) {
            _defaultTransletName = (String)value;
  -     // Throw an exception for all other attributes
  -     ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
  -     throw new IllegalArgumentException(err.toString());
  +     }
  +     else if (name.equals("debug")) {
  +         _debug = true;
  +     }
  +     else {
  +         // Throw an exception for all other attributes
  +         ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
  +         throw new IllegalArgumentException(err.toString());
  +     }
       }
   
       /**
  @@ -311,6 +319,7 @@
        }
   
        XSLTC xsltc = new XSLTC();
  +     if (_debug) xsltc.setDebug(true);
        xsltc.init();
   
        // Compile the default copy-stylesheet
  @@ -476,6 +485,7 @@
   
        // Create and initialize a stylesheet compiler
        final XSLTC xsltc = new XSLTC();
  +     if (_debug) xsltc.setDebug(true);
        xsltc.init();
   
        // Set a document loader (for xsl:include/import) if defined
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to