cziegeler    01/05/31 01:21:51

  Modified:    src/org/apache/cocoon/transformation TraxTransformer.java
  Log:
  This is a fix to solve the problems with including stylesheets
  from included stylesheets.
  As reported by Rick Tessner and Marcus Crafter including
  stylesheets from included stylesheets is not working as expected
  when the TraxTransformer resolves the href argument.
  
  This is due to a problem in the current Xalan Version 2.1.0
  which passes sometimes only a null pointer as the base argument
  to the resolve method of the URIResolver interface.
  So included stylesheets can ALWAYS only be resolved relative
  to the first called stylesheet. But included stylesheets which
  are included from an already included stylesheets should be
  resolved relative to the already included stylesheet.
  
  So we pass the resolving to Xalan which makes it correct.
  But the disadvantige is that the special cocoon urls,
  like context: or resource: can not be resolved when used
  in xsl:include.
  
  When the problem in Xalan is fixed we can change this again.
  
  Revision  Changes    Path
  1.12      +8 -2      
xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TraxTransformer.java      2001/05/29 17:05:04     1.11
  +++ TraxTransformer.java      2001/05/31 08:21:49     1.12
  @@ -100,7 +100,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
  - * @version CVS $Id: TraxTransformer.java,v 1.11 2001/05/29 17:05:04 dims Exp $
  + * @version CVS $Id: TraxTransformer.java,v 1.12 2001/05/31 08:21:49 cziegeler Exp $
    */
   public class TraxTransformer extends ContentHandlerWrapper
   implements Transformer, Composable, Recyclable, Configurable, Cacheable, 
Disposable, URIResolver {
  @@ -295,7 +295,13 @@
           if(tfactory == null)  {
               tfactory = (SAXTransformerFactory) TransformerFactory.newInstance();
               tfactory.setErrorListener(new TraxErrorHandler(getLogger()));
  -            tfactory.setURIResolver(this);
  +            // FIXME (CZ)
  +            // The current Xalan Version 2.1.0 passes sometimes only
  +            // a null pointer to the resolve method as the base argument.
  +            // So we can add this if the problem is solved.
  +            // Until then resolving of our special urls will not work
  +            // using include of the stylesheets.
  +            // tfactory.setURIResolver(this);
           }
           return tfactory;
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to