You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2006/10/31 04:06:50 UTC

svn commit: r469349 - /xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java

Author: minchau
Date: Mon Oct 30 19:06:50 2006
New Revision: 469349

URL: http://svn.apache.org/viewvc?view=rev&rev=469349
Log:
Committing patch for XALANJ-2297 to the code base,
fixing a but for when the wrong base URI is passed to
a URI resolver.

Modified:
    xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java

Modified: xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java?view=diff&rev=469349&r1=469348&r2=469349
==============================================================================
--- xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java (original)
+++ xalan/java/trunk/src/org/apache/xalan/processor/ProcessorInclude.java Mon Oct 30 19:06:50 2006
@@ -196,7 +196,13 @@
     try
     {
       Source source = null;
-
+      
+      // The base identifier, an aboslute URI
+      // that is associated with the included/imported
+      // stylesheet module is known in this method,
+      // so this method does the pushing of the
+      // base ID onto the stack.
+     
       if (null != uriresolver)
       {
         // There is a user provided URI resolver.
@@ -217,6 +223,11 @@
           // which we now retrieve.
           String systemId = handler.peekImportURL();
           
+          // Push the absolute URI of the included/imported
+          // stylesheet module onto the stack.
+          if (systemId != null)
+              handler.pushBaseIndentifier(systemId);
+        
           TreeWalker walker = new TreeWalker(handler, new org.apache.xml.utils.DOM2Helper(), systemId);
 
           try
@@ -227,6 +238,8 @@
           {
             throw new TransformerException(se);
           }
+          if (systemId != null)
+            handler.popBaseIndentifier();
           return;
         }
       }
@@ -289,6 +302,9 @@
       if (null != reader)
       {
         reader.setContentHandler(handler);
+        
+        // Push the absolute URI of the included/imported
+        // stylesheet module onto the stack.
         handler.pushBaseIndentifier(inputSource.getSystemId());
 
         try



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