You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Nicola Ken Barozzi <ni...@supereva.it> on 2000/08/02 21:34:18 UTC
Cocoon Icons and Graphics
Some icons and graphics for C2.
MrCocoon2 is anothew "view" for cocoon. ;-)
What do you think of them?
nicola_ken
C2: Bug in ResourcePipeline.java - MimeType ignored
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello,
the setSerializer() method in ResourcePipeline.java ignores the mimeType parameter.
Here is the correction:
Index: ResourcePipeline.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
retrieving revision 1.1.2.11
diff -r1.1.2.11 ResourcePipeline.java
110a111
> this.serializerMimeType = mimeType;
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...
AW: C2: Setting mime-type for the Serializer
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello
sorry, its just me again. Reading the sitemap draft again, I found a third possibility for setting the mime-type. So the list looks like this:
1.) Setting the mime-type attribute in the map:serialize node
This is currently ignored (see my bug email), but would be
handled by the ResourcePipeline
2.) Setting the contentType parameter inside the map:serialize node
This works, but is done by every serializer itself
3.) Settign the mime-type attribute in the map:serializer node
This is not implemented yet
So my new assumption is that the first and the third one are legal and correct and the second is a relict.
Going further with my thoughts, I think the first has precedence over the third.
If this all is true, here is a diff for the ResourcePipeline.java which together with my extension to the sitemap (see my other email) enables exactly this setting scheme of the mime-type:
Index: ResourcePipeline.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
retrieving revision 1.1.2.11
diff -r1.1.2.11 ResourcePipeline.java
110a111,114
> if (mimeType == null && conf != null) {
> mimeType = conf.getAttribute("mime-type", null);
> }
> this.serializerMimeType = mimeType;
The last line includes the bug fix I posted earlier this day.
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...
C2: Bug in ResourcePipeline.java - Serializer mimeType setting
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello,
the process() method of the ResourcePipeline class has a bug regarding the mimeType handling of the serializer.
Here is the diff:
Index: ResourcePipeline.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
retrieving revision 1.1.2.11
diff -r1.1.2.11 ResourcePipeline.java
155,156c159,161
< if (serializerMimeType != null)
< environment.setContentType (readerMimeType);
---
> if (serializerMimeType != null) {
> environment.setContentType (serializerMimeType);
> }
Together with my other patch from today, the mimeType handling of the serializer works according to the sitemap draft (if I understood it right....)
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...
C2: Sitemap-extension: New configuration scheme for components
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello,
according to the sitemap draft, the following configuration possibility is desired:
<map:serializer name="wap" mime-type="text/vnd.wap.wml" src="org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
<doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>
The current sitemap creates an org.apache.avalon.Configuration object which gets a value of the first node inside the map:serializer node, in this example doctype-public. The other nodes are not reachable.
I changed the sitemap.xsl so that an org.apache.avalon.Configuration object is created which is constructed similar to the Configuration objects of the general components of the cocoon.xconf:
A root Configuration object is created which gets all attributes of the map:serializer node.
For each child of map:serializer a new sub-configuration object is created.
If this is an acceptable solution, here is the diff:
Index: sitemap.xsl
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
retrieving revision 1.1.2.18
diff -r1.1.2.18 sitemap.xsl
475a496,513
>
> <xsl:if test="$ns">
> confBuilder.startPrefixMapping("","<xsl:value-of select="namespace-uri(.)"/>");
> </xsl:if>
> <!-- Create root configuration -->
> attr.clear();
> <xsl:for-each select="attribute::*[name(.)!=$qname]">
> attr.addAttribute ("",
> "<xsl:value-of select="local-name(.)"/>",
> "<xsl:value-of select="name(.)"/>",
> "CDATA",
> "<xsl:value-of select="."/>");
> </xsl:for-each>
>
> confBuilder.startElement ("",
> "<xsl:value-of select="translate(@name, '- ', '__')"/>",
> "<xsl:value-of select="translate(@name, '- ', '__')"/>", attr);
>
483a522,528
> <!-- end root configuration -->
> confBuilder.endElement ("",
> "<xsl:value-of select="translate(@name, '- ', '__')"/>",
> "<xsl:value-of select="translate(@name, '- ', '__')"/>");
> <xsl:if test="$ns">
> confBuilder.endPrefixMapping("");
> </xsl:if>
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...
C2: Setting mime-type for the Serializer
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello,
looking through the sitemap-draft and the serializer sources I found, that there are currently two possibilites for defining the mime-type for the serializer:
1.) Setting the mime-type attribute in the map:serialize node
This is currently ignored (see my bug email), but would be handled by the ResourcePipeline
2.) Setting the contentType parameter inside the map:serialize node
This works, but is done by every serializer itself
I assume that the first one is the correct one and the other is a relict.
Is this correct?
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================
------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...
Re: Cocoon Icons and Graphics
Posted by Paul Russell <pa...@luminas.co.uk>.
On Wed, Aug 02, 2000 at 09:34:18PM +0200, Nicola Ken Barozzi wrote:
> Some icons and graphics for C2.
> MrCocoon2 is anothew "view" for cocoon. ;-)
> What do you think of them?
Heh! Got a lot of spare time, huh? <grin>
Thoughts on committing the two icons for inclusion in the .war
file? (Assuming Nic is happy with that, obviously.)
--
Paul Russell <pa...@luminas.co.uk>
Technical Director, http://www.luminas.co.uk
Luminas Ltd.
Re: Cocoon Icons and Graphics
Posted by Nicola Ken Barozzi <ni...@supereva.it>.
----- Original Message -----
From: "Stefano Mazzocchi" <st...@apache.org>
To: <co...@xml.apache.org>
Sent: Saturday, August 05, 2000 9:24 PM
Subject: Re: Cocoon Icons and Graphics
> Nicola Ken Barozzi wrote:
> >
> > Some icons and graphics for C2.
> > MrCocoon2 is anothew "view" for cocoon. ;-)
> > What do you think of them?
>
> I love the idea of a "Mr. Cocoon"... in my dreams, I see such a
> character as a "mascotte", much like Java's "Duke" (which I deeply
> consider a piece of art for simplicity and effectiveness).
I agree.
> I like your "ascii" view of it, but it's kinda static.... I would love
> to see it surfing or jumping or jiggling or swinging... in that sense
> even Linux's Pinguin is cool but static.
I just found it fun that the cocoon logo could me rearranged in
that way and I wanted to share the... "view" :-) , but
I'm no graphic.
> But this is my personal vision and I could as one so let's have a "Mr.
> Cocoon contest": we'll place the submissions and have a graphic contest
> for logos and names (even "Mr. Cocoon" can be changed).
>
> I have some artistic-type friends... I'll ping them for this... hope you
> guys do the same with your friends or the graphic people in your
> companies :) Please help the cause in any way you can.
And Cocoon 2 "style", with icons, fonts, css, stylesheets, etc?
nicola_ken
Nicola Ken Barozzi - AISA Industries S.p.A
http://www.aisaindustries.it/
Via Leonardo da Vinci,2 Ticengo (CR) Italy
Personal homepage at Java Guru:
http://www.jguru.com/jguru/guru/viewchannel.jsp?EID=39153
Personal FAQ at Java Guru:
http://www.jguru.com/jguru/guru/viewfaqs.jsp?EID=39153
Research Activity:
Politecnico di Milano - Dipartimento di Meccanica
Piazza Leonardo da Vinci, n.32 - 20133 Milano (Italy)
Re: Cocoon Icons and Graphics
Posted by Stefano Mazzocchi <st...@apache.org>.
Nicola Ken Barozzi wrote:
>
> Some icons and graphics for C2.
> MrCocoon2 is anothew "view" for cocoon. ;-)
> What do you think of them?
I love the idea of a "Mr. Cocoon"... in my dreams, I see such a
character as a "mascotte", much like Java's "Duke" (which I deeply
consider a piece of art for simplicity and effectiveness).
I like your "ascii" view of it, but it's kinda static.... I would love
to see it surfing or jumping or jiggling or swinging... in that sense
even Linux's Pinguin is cool but static.
But this is my personal vision and I could as one so let's have a "Mr.
Cocoon contest": we'll place the submissions and have a graphic contest
for logos and names (even "Mr. Cocoon" can be changed).
I have some artistic-type friends... I'll ping them for this... hope you
guys do the same with your friends or the graphic people in your
companies :) Please help the cause in any way you can.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<st...@apache.org> Friedrich Nietzsche
--------------------------------------------------------------------
Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------