cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Poetz" <reinh...@apache.org>
Subject RE: [Flow] Importing multiple scripts? (ScriptDirectoryNode)
Date Tue, 24 Feb 2004 12:06:10 GMT


> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Andreas Hartmann
> Sent: Tuesday, February 24, 2004 11:54 AM
> To: dev@cocoon.apache.org
> Subject: Re: [Flow] Importing multiple scripts? (ScriptDirectoryNode)
> 
> 
> Reinhard Poetz wrote:
> > From: Andreas Hartmann
> > 
> > 
> >>Hi Cocoon developers,
> >>
> >>is it currently possible to include a set of scripts
> >>dynamically? I imagine something like a 
> >>o.a.c.c.treeprocessor.sitemap.ScriptDirectoryNode
> >>that works similar to the DirectoryGenerator by
> >>gathering all .js files in a certain directory tree.
> >>
> >>Or is there another way to achieve this functionality?
> > 
> > 
> > You can dynamically add scripts using
> > 
> >  <map:flow>
> >    <map:script src="cocoon://bla"/>
> >  </map:flow>
> > 
> > So you can use the DirectoryGenerator but be aware of possible 
> > conflicts by using the same function or global variable names.
> 
> OK. So I have to write scripts included in XML, aggregate
> them using the DirectoryGenerator, strip the XML tags and 
> serialize as text?

embedding Javascript in XML is IMHO ugly but it would work this way.
Does the directory generator read a all files including their content or
do you use the cinclude transformer? If so and it doesn't accept non-xml
content it should be patched.

--
Reinhard


> 
> Thank you for the hint,
> -- Andreas
> 


Mime
View raw message