cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bardo Nelgen <mailing.list.in...@bnnperformances.de>
Subject Re: Remove XML declaration and html DOCTYPE
Date Thu, 22 Aug 2013 12:39:25 GMT

Thanks nonetheless for the response, Thorsten.

The problem is: It won't work for me.

While the XML-declaration, indeed, disappears completely with the 
approach, the doctype remains there.

http://www.cityapi.eu/semaworx/MyCompressed.js

The mime-type is not additionally declared in the serialize element, 
since (as earlier posts suggested…) I went with defining a separate 
serializer:

> <map:serializer logger="sitemap.serializer.text" 
> mime-type="application/ecmascript" name="js" 
> src="org.apache.cocoon.serialization.TextSerializer">
> <encoding>UTF-8</encoding>
> <omit-xml-declaration>true</omit-xml-declaration>
> </map:serializer>
and inside the pipeline
> <map:serialize type="js" >
> <map:parameter name="omit-xml-declaration" value="yes"/>
> </map:serialize>

And despite the charset-entry, the resulting file is also still being 
shipped as ISO-8859-15 rather than utf-8.

I'm sure, I'm missing something here – just don't know, what it is…



On 22.08.13 12:01, Thorsten Scherler wrote:

> On this eMail the reason why top posting is not such a good idea for ml.
> I have no clue about the context.
>
> However
>
> <map:serialize type="text" >
>
> will return mime-type="text/plain"
>
> You want mime-type="application/json"
>
> <map:serialize type="text" mime-type="application/json">
>    <map:parameter name="omit-xml-declaration" value="yes"/>
> </map:serialize>
>
> HTH

> On 08/21/2013 11:18 PM, Bardo Nelgen wrote:
>> Hi all,
>>
>> sorry to pick this up again so late, but is there a solution for
>> Cocoon 2.2 as well?
>>
>> Tried both approaches without the desired result, for a piece of
>> generated JavaScript…
>>
>> As the XML serialization did not work as advertised in this thread so
>> far, I'm currently going with
>>
>>> <map:serialize type="text" >
>> and keep getting
>>
>> http://www.cityapi.eu/semaworx/MyCompressed.js
>>
>> Looking for ideas on how to make the Doctype disappear *without*
>> running an extra XSLT cycle?
>>
>> Any hint is appreciated!!
>>
>> Best,
>>
>> Bardo
>>
>>
>> On 19.06.13 18:55, Mansour Al Akeel wrote:
>>> <map:parameter name="omit-xml-declaration" value="yes"/>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message