Worked like a charm.
Many thanks.
Jason Johnston-3 wrote:
>
> 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
> reader[2]:
>
> <map:match pattern="**.js">
> <map:read src="{1}.js" mime-type="text/javascript" />
> </map:match>
>
>
> [1] http://cocoon.apache.org/2.1/userdocs/readers.html
> [2] http://cocoon.apache.org/2.1/userdocs/default/resource-reader.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Including-a-js-file-tf3936860.html#a11173903
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]