cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: Including a js file
Date Sun, 17 Jun 2007 22:18:53 GMT
lfhc wrote:
> Hi all,
> I'm using cocoon to translate an xml file to html, to generate the interface
> from a content I get from a cms.
> On that interface I want to include some javascripts such as :
> ...
> And I would like this to be allocated within cocoon, since it should handle
> all that is interface.
> My problem is that, if I don't register it in the sitemap.xmap file, any
> call will give me a sitemap.xmap file - Resource not foud. 
> If I set an instance, it will try to parse it, and it is not an xml file. I
> get the following error :
> org.xml.sax.SAXParseException: Content is not allowed in prolog.
> file:/C:/installers/cocoon/cocoon-2.1.10/build/webapp/samples/aggregation/content/prototype.js
> - 1:1 
> How can I do this, that is, have just a resource for this webapp, that is
> not parsed, but I can call it through cocoon? 

It sounds like you want to use a reader[1], specifically the resource 

<map:match pattern="**.js">
   <map:read src="{1}.js" mime-type="text/javascript" />


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message