cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/markup AbstractMarkupLanguage.java
Date Thu, 30 Aug 2001 08:43:57 GMT
sylvain     01/08/30 01:43:57

  Modified:    src/org/apache/cocoon/components/language/markup
                        AbstractMarkupLanguage.java
  Log:
  Add a prefix to the filename for the cache key, to avoid conflicts with XSLTProcessor wich
also uses the filename as the cache key
  
  Revision  Changes    Path
  1.10      +8 -5      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractMarkupLanguage.java	2001/08/25 19:40:31	1.9
  +++ AbstractMarkupLanguage.java	2001/08/30 08:43:57	1.10
  @@ -54,7 +54,7 @@
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
  - * @version CVS $Revision: 1.9 $ $Date: 2001/08/25 19:40:31 $
  + * @version CVS $Revision: 1.10 $ $Date: 2001/08/30 08:43:57 $
    */
   public abstract class AbstractMarkupLanguage extends AbstractLoggable
     implements MarkupLanguage, Composable, Configurable
  @@ -76,6 +76,9 @@
   
       /** The component manager */
       protected ComponentManager manager;
  +    
  +    /** Prefix for cache keys to avoid name clash with the XSLTProcessor */
  +    private static final String CACHE_PREFIX = "logicsheet:";
   
     /**
      * The URL factory used to resolve URIs.
  @@ -131,7 +134,7 @@
           // Create & Store the core logicsheet
           Logicsheet logicsheet = createLogicsheet(lcp, false);
           String logicsheetName = logicsheet.getSystemId();
  -        logicsheetCache.store(logicsheetName, logicsheet);
  +        logicsheetCache.store(CACHE_PREFIX + logicsheetName, logicsheet);
           language.setLogicsheet(logicsheetName);
   
           // Set up each built-in logicsheet
  @@ -144,7 +147,7 @@
               = (NamedLogicsheet)createLogicsheet(ncp, true);
             logicsheetName = namedLogicsheet.getSystemId();
             String logicsheetPrefix = namedLogicsheet.getPrefix();
  -          logicsheetCache.store(logicsheetName, namedLogicsheet);
  +          logicsheetCache.store(CACHE_PREFIX + logicsheetName, namedLogicsheet);
                       
             // FIXME: Logicsheets should be found by uri--not prefix.
             language.addNamedLogicsheet(logicsheetPrefix, logicsheetName);
  @@ -331,7 +334,7 @@
                                        SourceResolver resolver)
       throws MalformedURLException, IOException, SAXException, ProcessingException
     {
  -    Logicsheet logicsheet = (Logicsheet)logicsheetCache.get(logicsheetLocation);
  +    Logicsheet logicsheet = (Logicsheet)logicsheetCache.get(CACHE_PREFIX + logicsheetLocation);
       String logicsheetName;
   
       getLogger().debug("AbstractMarkupLanguage addLogicsheetToList: "
  @@ -343,7 +346,7 @@
         logicsheet = new Logicsheet(inputSource, manager);
         logicsheetName = logicsheet.getSystemId();
   
  -      logicsheetCache.store(logicsheetName, logicsheet);
  +      logicsheetCache.store(CACHE_PREFIX + logicsheetName, logicsheet);
       }
       else
         logicsheetName = logicsheet.getSystemId();
  
  
  

----------------------------------------------------------------------
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