cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation XIncludeTransformer.java
Date Thu, 31 May 2001 13:18:51 GMT
dims        01/05/31 06:18:51

  Modified:    src/org/apache/cocoon Cocoon.java
               src/org/apache/cocoon/acting
                        AbstractComplementaryConfigurableAction.java
               src/org/apache/cocoon/components/language/markup
                        AbstractMarkupLanguage.java
               src/org/apache/cocoon/transformation
                        XIncludeTransformer.java
  Log:
  - Ensure that all InputSource's have the system id set.
  
  Revision  Changes    Path
  1.6       +4 -4      xml-cocoon2/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Cocoon.java	2001/05/30 13:32:21	1.5
  +++ Cocoon.java	2001/05/31 13:18:35	1.6
  @@ -53,7 +53,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
(Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2001/05/30 13:32:21 $
  + * @version CVS $Revision: 1.6 $ $Date: 2001/05/31 13:18:35 $
    */
   public class Cocoon extends AbstractLoggable implements ThreadSafe, Component, Initializable,
Disposable, Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -149,8 +149,8 @@
               ClassLoader cl = (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER);
               InputStream inputStream = ClassUtils.getResource("org/apache/cocoon/cocoon.roles").openStream();
               InputSource is = new InputSource(inputStream);
  -            p.setContentHandler(b);
               is.setSystemId(this.configurationFile.toExternalForm());
  +            p.setContentHandler(b);
               p.parse(is);
               roleConfig = b.getConfiguration();
           } catch (Exception e) {
  @@ -169,8 +169,8 @@
               p = (Parser)this.componentManager.lookup(Roles.PARSER);
               SAXConfigurationHandler b = new SAXConfigurationHandler();
               InputSource is = new InputSource(this.configurationFile.openStream());
  -            p.setContentHandler(b);
               is.setSystemId(this.configurationFile.toExternalForm());
  +            p.setContentHandler(b);
               p.parse(is);
               this.configuration = b.getConfiguration();
           } catch (Exception e) {
  @@ -200,8 +200,8 @@
                       (org.apache.cocoon.environment.Context) this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
                   URL url = context.getResource(userRoles);
                   InputSource is = new InputSource(new BufferedInputStream(url.openStream()));
  -                p.setContentHandler(b);
                   is.setSystemId(this.configurationFile.toExternalForm());
  +                p.setContentHandler(b);
                   p.parse(is);
                   roleConfig = b.getConfiguration();
               } catch (Exception e) {
  
  
  
  1.2       +4 -4      xml-cocoon2/src/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java
  
  Index: AbstractComplementaryConfigurableAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractComplementaryConfigurableAction.java	2001/05/09 20:50:04	1.1
  +++ AbstractComplementaryConfigurableAction.java	2001/05/31 13:18:40	1.2
  @@ -27,7 +27,7 @@
    * effective.  The name of the root configuration element is irrelevant.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/05/09 20:50:04 $
  + * @version CVS $Revision: 1.2 $ $Date: 2001/05/31 13:18:40 $
    */
   public abstract class AbstractComplementaryConfigurableAction extends ComposerAction {
       private static Map configurations = new HashMap();
  @@ -59,11 +59,11 @@
   
                       parser = (Parser)this.manager.lookup(Roles.PARSER);
                       SAXConfigurationHandler builder = new SAXConfigurationHandler();
  -                    InputSource inputStream = new InputSource(resource.openStream());
  +                    InputSource inputSource = new InputSource(resource.openStream());
  +                    inputSource.setSystemId(resource.toExternalForm());
   
                       parser.setContentHandler(builder);
  -                    inputStream.setSystemId(resource.toExternalForm());
  -                    parser.parse(inputStream);
  +                    parser.parse(inputSource);
   
                       conf = builder.getConfiguration();
                   } catch (Exception e) {
  
  
  
  1.3       +5 -2      xml-cocoon2/src/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java
  
  Index: AbstractMarkupLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractMarkupLanguage.java	2001/05/22 14:32:22	1.2
  +++ AbstractMarkupLanguage.java	2001/05/31 13:18:45	1.3
  @@ -50,7 +50,7 @@
    * logicsheets as the only means of code generation. Code generation should be decoupled
from this context!!!
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2001/05/22 14:32:22 $
  + * @version CVS $Revision: 1.3 $ $Date: 2001/05/31 13:18:45 $
    */
   public abstract class AbstractMarkupLanguage extends AbstractLoggable implements MarkupLanguage,
Composable, Configurable {
       /** The supported language table */
  @@ -178,7 +178,9 @@
               if (urlFactory!=null) this.manager.release((Component) urlFactory);
           }
   
  -        logicsheet.setInputSource(new InputSource(logicsheetURL.openStream()));
  +        InputSource is = new InputSource(logicsheetURL.openStream());
  +        is.setSystemId(logicsheetURL.toString());
  +        logicsheet.setInputSource(is);
   
           entry = new CachedURL(logicsheetURL, logicsheet);
           entry.setLogger(getLogger());
  @@ -326,6 +328,7 @@
               }
               getLogger().debug("Logicsheet Used:" + url.toExternalForm());
               inputSource = new InputSource(url.openStream());
  +            inputSource.setSystemId(url.toString());
   
               String logicsheetName = url.toExternalForm();
               CachedURL entry = (CachedURL)this.logicsheetCache.get(logicsheetName);
  
  
  
  1.5       +3 -1      xml-cocoon2/src/org/apache/cocoon/transformation/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/XIncludeTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XIncludeTransformer.java	2001/05/29 06:13:47	1.4
  +++ XIncludeTransformer.java	2001/05/31 13:18:48	1.5
  @@ -54,7 +54,7 @@
    * by the SAX event FSM yet.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2001/05/29 06:13:47 $ $Author: cziegeler $
  + * @version CVS $Revision: 1.5 $ $Date: 2001/05/31 13:18:48 $ $Author: dims $
    */
   public class XIncludeTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable {
   
  @@ -238,8 +238,10 @@
                   }
                   if (object instanceof Reader) {
                       input = new InputSource(new BufferedReader((Reader)object));
  +                    input.setSystemId(url.toString());
                   } else if (object instanceof InputStream) {
                       input = new InputSource(new BufferedInputStream((InputStream)object));
  +                    input.setSystemId(url.toString());
                   } else {
                       throw new SAXException("Unknown object type: "+object);
                   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message