You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/02/04 03:34:49 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/sitemap SitemapComponentSelector.java
vgritsenko 02/02/03 18:34:49
Modified: src/java/org/apache/cocoon/sitemap
SitemapComponentSelector.java
Log:
add comment
Revision Changes Path
1.5 +4 -1 xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapComponentSelector.java
Index: SitemapComponentSelector.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapComponentSelector.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SitemapComponentSelector.java 4 Feb 2002 02:30:34 -0000 1.4
+++ SitemapComponentSelector.java 4 Feb 2002 02:34:49 -0000 1.5
@@ -27,7 +27,7 @@
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
- * @version CVS $Id: SitemapComponentSelector.java,v 1.4 2002/02/04 02:30:34 vgritsenko Exp $
+ * @version CVS $Id: SitemapComponentSelector.java,v 1.5 2002/02/04 02:34:49 vgritsenko Exp $
*/
public class SitemapComponentSelector extends ExcaliburComponentSelector
implements OutputComponentSelector {
@@ -112,6 +112,7 @@
public String[] getLabels(Object hint) {
String[] labels = (String[])this.hintLabels.get(hint);
+ // Labels can be inherited or completely overrided
if (labels == null && parentSelector != null) {
return parentSelector.getLabels(hint);
}
@@ -127,6 +128,8 @@
String label = conf.getAttribute("label", null);
if (label != null) {
+ // Empty '' attribute will result in empty array,
+ // overriding all labels on the component declared in the parent.
StringTokenizer st = new StringTokenizer(label, " ,", false);
String[] labels = new String[st.countTokens()];
for (int i = 0; i < labels.length; i++) {
----------------------------------------------------------------------
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