cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r125444 - /cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java
Date Mon, 17 Jan 2005 20:50:07 GMT
Author: cziegeler
Date: Mon Jan 17 12:50:04 2005
New Revision: 125444

URL: http://svn.apache.org/viewcvs?view=rev&rev=125444
Log:
Edit simple pattern matching for includes
Modified:
   cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java

Modified: cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java?view=diff&rev=125444&p1=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java&r1=125443&p2=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java&r2=125444
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java	(original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java	Mon
Jan 17 12:50:04 2005
@@ -671,14 +671,17 @@
             
             loadURI(src, loadedURIs, includeStatement);
         } else {
+            final String ending = includeStatement.getAttribute("postfix", null);
             Source directory = null;
             try {
                 directory = this.cachedSourceResolver.resolveURI(directoryURI, contextURI,
null);
                 if ( directory instanceof TraversableSource ) {
                     final Iterator children = ((TraversableSource)directory).getChildren().iterator();
                     while ( children.hasNext() ) {
-                        Source s = (Source)children.next();
-                        this.loadURI(s, loadedURIs, includeStatement);
+                        final Source s = (Source)children.next();
+                        if ( ending == null || s.getURI().endsWith(ending) ) {
+                            this.loadURI(s, loadedURIs, includeStatement);
+                        }
                     }
                 } else {
                     throw new ConfigurationException("Include.dir must point to a directory,
'" + directory.getURI() + "' is not a directory.'");

Mime
View raw message