tmiller     01/07/20 13:06:50

  Modified:    java/src/org/apache/xalan/xsltc/compiler XSLTC.java
  Log:
  minor changes for DOMSource impl support
  
  Revision  Changes    Path
  1.19      +10 -6     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java
  
  Index: XSLTC.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XSLTC.java        2001/07/20 15:24:33     1.18
  +++ XSLTC.java        2001/07/20 20:06:50     1.19
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: XSLTC.java,v 1.18 2001/07/20 15:24:33 morten Exp $
  + * @(#)$Id: XSLTC.java,v 1.19 2001/07/20 20:06:50 tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -247,13 +247,15 @@
        * @return 'true' if the compilation was successful
        */
       public boolean compile(InputSource input, String name) {
  -
        try {
            // Reset globals in case we're called by compile(Vector v);
  -         reset();
  +         reset();   // GTM,Morten- this reset sets _reader back to null
   
            // The systemId may not be set, so we'll have to check the URL
  -         String systemId = input.getSystemId();
  +         String systemId = null; 
  +         if (input != null) {
  +             systemId = input.getSystemId();
  +         }
   
            // Set the translet class name if not already set
            if (_className == null) {
  @@ -267,10 +269,12 @@
   
            // Get the root node of the abstract syntax tree
            SyntaxTreeNode element = null;
  -         if (_reader == null)
  +         if (_reader == null) {
                element = _parser.parse(input);
  -         else
  +         }
  +         else {
                element = _parser.parse(_reader, input);
  +         }
   
            // Compile the translet - this is where the work is done!
            if ((!_parser.errorsFound()) && (element != null)) {
  
  
  

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

Reply via email to