santiagopg    2003/02/05 13:13:17

  Modified:    java/src/org/apache/xalan/xsltc/compiler Import.java
                        Include.java XSLTC.java
  Log:
  Committing patch for Bugzilla 10626 contributed by Arun Yadav
  ([EMAIL PROTECTED]).
  
  Revision  Changes    Path
  1.19      +11 -2     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java
  
  Index: Import.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Import.java       30 Jan 2003 18:46:00 -0000      1.18
  +++ Import.java       5 Feb 2003 21:13:17 -0000       1.19
  @@ -76,6 +76,7 @@
   import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
   
   import org.xml.sax.InputSource;
  +import org.xml.sax.XMLReader;
   
   final class Import extends TopLevelElement {
   
  @@ -100,10 +101,12 @@
            String currLoadedDoc = context.getSystemId();
            SourceLoader loader = context.getSourceLoader();
            InputSource input = null;
  +         XMLReader reader = null;
   
            if (loader != null) {
                final XSLTC xsltc = parser.getXSLTC();
                input = loader.loadSource(docToLoad, currLoadedDoc, xsltc);
  +             reader = xsltc.getXMLReader();
            }
            else {
                File file = new File(currLoadedDoc);
  @@ -121,7 +124,13 @@
                return;
            }
   
  -         SyntaxTreeNode root = parser.parse(input);
  +         final SyntaxTreeNode root;
  +            if (reader != null) {
  +                root = parser.parse(reader,input);
  +            }
  +            else {
  +                root = parser.parse(input);
  +            }
   
            if (root == null) return;
            _imported = parser.makeStylesheet(root);
  
  
  
  1.23      +13 -2     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java
  
  Index: Include.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Include.java      30 Jan 2003 18:46:00 -0000      1.22
  +++ Include.java      5 Feb 2003 21:13:17 -0000       1.23
  @@ -75,7 +75,9 @@
   import org.apache.xalan.xsltc.compiler.util.MethodGenerator;
   import org.apache.xalan.xsltc.compiler.util.Type;
   import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
  +
   import org.xml.sax.InputSource;
  +import org.xml.sax.XMLReader;
   
   final class Include extends TopLevelElement {
   
  @@ -100,10 +102,12 @@
            String currLoadedDoc = context.getSystemId();
            SourceLoader loader = context.getSourceLoader();
            InputSource input = null;
  +         XMLReader reader = null;
   
            if (loader != null) {
                final XSLTC xsltc = parser.getXSLTC();
                input = loader.loadSource(docToLoad, currLoadedDoc, xsltc);
  +             reader = xsltc.getXMLReader();
            }
            else {
                // bug 7835, patch by Stefan Kost ([EMAIL PROTECTED])
  @@ -141,7 +145,14 @@
                return;
            }
   
  -         final SyntaxTreeNode root = parser.parse(input);
  +         final SyntaxTreeNode root;
  +            if (reader != null) {
  +                root = parser.parse(reader,input);
  +            }
  +            else {
  +                root = parser.parse(input);
  +            }
  +              
            if (root == null) return;
            _included = parser.makeStylesheet(root);
            if (_included == null) return;
  
  
  
  1.48      +8 -1      
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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- XSLTC.java        30 Jan 2003 18:46:02 -0000      1.47
  +++ XSLTC.java        5 Feb 2003 21:13:17 -0000       1.48
  @@ -455,6 +455,13 @@
       public void setXMLReader(XMLReader reader) {
        _reader = reader;
       }
  +    
  +    /**
  +     * Get the XMLReader to use for parsing the next input stylesheet
  +     */
  +    public XMLReader getXMLReader() {
  +     return _reader ;
  +    }
   
       /**
        * Get a Vector containing all compile error messages
  
  
  

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

Reply via email to