i use another one approach i aggregate a some xml files in sitemap then i reorder elements inside the final xml [layout.xsl] and send the result for processing
<map:resource name="sitebuilder"> <map:aggregate element="site"> <map:part src="cocoon:/xml/Layout.xml"/> <map:part src="cocoon:/xml/xHead.xml"/> <map:part src="cocoon:/xml/xCommon.xml"/> <map:part src="cocoon:/xml/c{../1}.xml" label="content"/> <map:part src="cocoon:/xml/xFoot.xml"/> </map:aggregate> <map:transform src="../htdocs/sitestyle/layout.xsl"/> <map:transform src="../htdocs/core/xsl/core.xsl"/> <map:serialize type="html"/> </map:resource> in layout.xml i have instruction where i want to put my elements <site> . . . <osm:pageSettings> <osm:copy select="common"/> <!-- copy here the container with contentID="common"--> </osm:pageSettings> . . . <osm:container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osm="http://osmosis.gr/osml/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.0" xsi:noNamespaceSchemaLocation="./core/schema/generated.xsd" contentID="common"> <osm:commonSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osm="http://osmosis.gr/osml/1.0"> <osm:stylesheet> <osm:css>themes/osml_main_size.css</osm:css> <osm:css>themes/osml_main_layout.css</osm:css> <osm:css>themes/osml_main_color.css</osm:css> </osm:stylesheet> </osm:commonSettings> </osm:container> </site> and the xsl that reorder my xml .. .. <xsl:template match="osm:copy"> <xsl:call-template name="getContent"> <xsl:with-param name="select" select="@select"/> </xsl:call-template> </xsl:template> .. .. <xsl:template name="getContent"> <xsl:param name="select"/> <xsl:apply-templates select="//osm:container[@contentID=$select]"/> </xsl:template> <xsl:template match="node()|@*" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> hope all this can help you Stavros Kounis osmosis networks & consulting http://www.osmosis.gr On Wed, 29 Jan 2003, Jeff Ramsdale wrote: > Hi there, > > I'm relatively new to Cocoon and XML and I've been lurking on the list for a > while. I have a problem that's stymied me--perhaps someone could help me? I > want to build an aggregate web page from a set of simple XHTML pages by > extracting the contents of their bodies and aggregating them. I have an XML > file that designates the structure of the page: > > <?xml version="1.0"?> > <page> > <column> > <module>AboutIntro.xhtml</module> > <module>AboutQContinued.xhtml</module> > </column> > <column> > <module>AboutQ3.xhtml</module> > </column> > </page> > > I have a stylesheet that I mean to use to aggregate the files, but I haven't > figured out a way to pull in the bodies of the files designated by the XML > above. I've designated below where I've been inserting my test code: > > <?xml version="1.0"?> > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> > <xsl:output method="html" /> > <xsl:template match="/"> > <html> > <xsl:call-template name="page" /> > </html> > </xsl:template> > <xsl:template name="page"> > <xsl:apply-templates/> > </xsl:template> > <xsl:template match="column"> > <p> > <xsl:text>Column</xsl:text> > <br /> > <xsl:apply-templates select="module" /> > </p> > </xsl:template> > <xsl:template match="module"> > <xsl:variable name="mod"> > <xsl:value-of select="." /> > </xsl:variable> > <!-- HERE'S THE MISSING CODE --> > <xsl:text>Module</xsl:text> > <br /> > </xsl:template> > </xsl:stylesheet> > > What's the missing piece? I tried using xinclude and cinclude, but my > impression is that they are intended for an XML file to include another XML > file, not for a stylesheet to include XML. (I do understand that a > stylesheet _IS_ XML, though, so perhaps I just missed how I should have done > that?). I also tried to do a map:aggregate from my pipeline, but couldn't > figure out how to do that based on the contents of my XML file. > > If my approach is misguided, feel free to correct me. Also, if I should know > of other projects doing similar things, do let me know. (I'm just beginning > to read about Forrest, for instance.) > > Thanks, all! > > Jeff > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>