Return-Path: Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 94865 invoked by uid 1152); 24 Oct 2000 17:46:33 -0000 Date: 24 Oct 2000 17:46:33 -0000 Message-ID: <20001024174633.94863.qmail@locus.apache.org> From: bloritsch@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java sitemap.xsl bloritsch 00/10/24 10:46:32 Modified: src/org/apache/cocoon/components/language/markup/sitemap/java Tag: xml-cocoon2 sitemap.xsl Log: Fixed sitemap.xsl so that nested configurations are built correctly. Revision Changes Path No revision No revision 1.1.2.53 +20 -13 xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl Index: sitemap.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v retrieving revision 1.1.2.52 retrieving revision 1.1.2.53 diff -u -r1.1.2.52 -r1.1.2.53 --- sitemap.xsl 2000/10/23 21:17:46 1.1.2.52 +++ sitemap.xsl 2000/10/24 17:46:32 1.1.2.53 @@ -46,6 +46,7 @@ import java.util.List; import java.util.ArrayList; import java.util.Map; + import java.util.Stack; import javax.servlet.http.HttpServletRequest; @@ -73,7 +74,7 @@ * This is the automatically generated class from the sitemap definitions * * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a> - * @version CVS $Revision: 1.1.2.52 $ $Date: 2000/10/23 21:17:46 $ + * @version CVS $Revision: 1.1.2.53 $ $Date: 2000/10/24 17:46:32 $ */ public class extends AbstractSitemap { static { @@ -187,9 +188,9 @@ * <code>Configurable</code> class. */ public void configure(Configuration conf) throws ConfigurationException { + Stack stack = new Stack(); DefaultConfiguration cconf; - DefaultConfiguration current; - DefaultConfiguration nested; + DefaultConfiguration temp; this.sitemapManager = new Manager(super.sitemapComponentManager); this.sitemapManager.compose(this.manager); @@ -713,14 +714,15 @@ - cconf = new DefaultConfiguration(""); + stack.clear(); - current = new DefaultConfiguration(""); + cconf = new DefaultConfiguration(""); - current.addAttribute ("", + cconf.addAttribute ("", ""); + stack.push(cconf); @@ -730,8 +732,7 @@ - cconf.addChild(current); - + stack.pop(); load_component (":", "", cconf, ""); @@ -759,16 +760,22 @@ - nested = new DefaultConfiguration(""); + temp = new DefaultConfiguration(""); - nested.addAttribute ("", ""); + temp.addAttribute ("", ""); - nested.appendValueData(""); + temp.appendValueData(""); - nested.appendValueData(""); + temp.appendValueData(""); + if (!stack.empty()) { + DefaultConfiguration p = (DefaultConfiguration) stack.peek(); + p.addChild(temp); + } + + stack.push(temp); @@ -783,7 +790,7 @@ - current.addChild(nested); + stack.pop();