Hi Darren, Cool, CInclude looks like the ideal approach :-)
I'm hoping to get a good set of tools together for working with IMSCP and Cocoon, and I'll post details when I've got something presentable. Many thanks, Dave. > -----Original Message----- > From: Darren Petrie [mailto:[EMAIL PROTECTED] > Sent: 17 March 2003 13:47 > To: [EMAIL PROTECTED] > Subject: Re: Creating an aggregation from a list of files > > > You have 3 fairly straight forward options whereby you can > process your > "manifest" to aggregate your files. > > 1) Use document() function within an XSL transformation > 2) Transform your manifest, create XInclude statements and > run through > the XInclude transformer. > 3) Transform your manifest, create CInclude statements and > run through > the CInclude transformer. > > CInclude allows you to call Cocoon pipelines so it is very > powerful. I > would recommend it. > http://xml.apache.org/cocoon/userdocs/transformers/cinclude- > transformer.html > > In a nutshell your fileGenerator will read manifest.xml > > <manifest> > <resource link="somefile.xml"/> > <resource link="someotherfile.xml"/> > </manifest> > > It will run it through some XSL code that will generate > > <manifest> > <cinclude:include src="somefile.xml"/> > <cinclude:include src="someotherfile.xml"/> > </manifest> > > This runs through CInclude with the final result > > <manifest> > <somefile>stuff</somefile> > <someotherfile>different stuff</someotherfile> > </manifest> > > Note that the Cinclude statements can use the cocoon protocol > which is > very powerful > <cinclude:include src="cocoon:/somefile.xml"/> > > Hope that helps. > Darren > > > On Monday, Mar 17, 2003, at 14:23 Europe/Berlin, David Balch wrote: > > > Hi Yves, thanks for the reply. > > > >> -----Original Message----- From: Yves Vindevogel 17 March > 2003 12:50 > >> > >> Something like this > >> <map:match pattern="sxw/*/*.html"> > >> <map:aggregate element="document"> > >> <map:part > >> src="sxw/{1}/{2}.sxw!/content.xml"/> > >> <map:part > >> src="sxw/{1}/{2}.sxw!/meta.xml"/> > >> </map:aggregate> > >> <map:transform > >> src="xsl/html.sxwfiles.xsl"> > >> <map:parameter > >> name="relpath" value="../.."/> > >> <map:parameter > >> name="use-request-parameters" value="true"/> > >> </map:transform> > >> <map:serialize/> > >> </map:match> > > > > > > Unfortunately this isn't what I'm trying to do. In your case you > > already > > know that you want to get "content.xml" and "meta.xml", but > in mine, I > > don't > > know what the filenames will be - that's largely what the > IMS manifest > > is > > there to describe. > > > > Hopefully the following will make it more clear: > > > > > > /////////// Mockup IMS manifest fragment \\\\\\\\\\\\ > > > > <organization> > > <!-- *The 'organization' is a heirarchy for the content in the > > IMSCP* --> > > > > <title>Example of IMSCP</title> > > <item identifier="ItemOne" identifierref="ItemOneResource"> > > <title>The first item in the 'organization'</title> > > </item> > > <item identifier="ItemTwo" identifierref="ItemTwoResource"> > > <title>The second item in the 'organization'</title> > > </item> > > </organization> > > > > <resources> > > <!-- *'resource's are pointers to the content files and > metadata* --> > > > > <resource identifier="ItemOneResource" type="webcontent" > > adlcp:scormtype="asset"> > > <metadata> > > > > <!-- *The metadata file is needed for a description > of the file* > > --> > > <schema>ADL SCORM</schema> > > <schemaversion>1.2</schemaversion> > > > > <!-- *this is the name of one of the files I want to > aggregate* > > --> > > <adlcp:location>ItemOneMetadata.xml</adlcp:location> > > </metadata> > > <file href="ItemOneFile.html"/> > > </resource> > > > > <resource identifier="ItemTwoResource" type="webcontent" > > adlcp:scormtype="asset"> > > <metadata> > > <schema>ADL SCORM</schema> > > <schemaversion>1.2</schemaversion> > > > > <!-- *this is the name of another of the files I want to > > aggregate* > > --> > > <adlcp:location>ItemTwoMetadatameta.xml</adlcp:location> > > </metadata> > > <file href="ItemTwoFile.html"/> > > </resource> > > > > </resources> > > > > \\\\\\\\\\\\\ End Mockup IMS manifest fragment ///////////// > > > > > > > > The desired aggregation would be something like: > > > > <map:match pattern="*/*.html"> > > <map:aggregate element="document"> > > <!-- the following 'map:part's are created from the IMS > manifest > > --> > > <map:part src="{1}/ItemOneMetadatameta.xml"/> > > <map:part src="{1}/ItemTwoMetadatameta.xml"/> > > </map:aggregate> > > ... > > </map:match> > > > > Does that make sense? > > > > Cheers, > > Dave. > > > >>> Hi, > >>> > >>> I'm trying to get Cocoon working with IMS Content > >> Packages[IMS-CP], to help > >>> my development process, and could do with some help. > >>> > >>> Short version: > >>> Can Cocoon accept an XML file listing several other files, > >> and make an > >>> aggregate from the files listed? If so, how? > >>> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > Darren Petrie > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
