cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Squaring the sitemap circle...
Date Thu, 25 May 2000 11:01:52 GMT
John Prevost wrote:
> 
> I haven't looked everything over yet, but here's a short comment about
> choice of elements/attributes for potential future extensibility and
> description via DTD or Schema (I know this isn't a priority now, but...)
> 
>    <serializer type="html" mime-type="text/html"
>                class="classpath:org.apache.cocoon.serializer.HTMLSerializer">
>     <doctype-public>-//W3C//DTD HTML 4.0 Transitional//EN</doctype-public>
>     <doctype-system>http://www.w3.org/TR/REC-html40/loose.dtd</doctype-system>
>     <preserve-space>true</preserve-space>
>     <encoding>UTF-8</encoding>
>     <indent>1</indent>
>     <line-width>120</line-width>
>    </serializer>
> 
>    <serializer type="wap" mime-type="text/vnd.wap.wml"
>                class="classpath:org.apache.cocoon.serializer.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>
>    </serializer>
> 
>    <serializer type="svg2jpg" mime-type="image/jpg"
>                class="classpath:org.apache.cocoon.serializer.SVGSerializer">
>     <format>jpg</format>
>     <compression-level>80%</compression-level>
>    </serializer>
> 
>    <serializer type="svg2png" mime-type="image/png"
>                class="classpath:org.apache.cocoon.serializer.SVGSerializer">
>     <format>png</format>
>     <color-depth>24</color-depth>
>    </serializer>
> 
> In these serializers, we see a number of different elements which
> contain information specific to the serializer:
> 
> doctype-public
> doctype-system
> preserve-space
> encoding
> indent
> line-width
> format
> compression-level
> color-depth
> 
> While some of these may be common to various things (xml-ish items
> want doctype, preserve space, etc.), these seem generally to be an
> open set of possible "arguments" to the serializers.
> 
> I'd suggest that something like:
> 
>    <serializer type="html" mime-type="text/html"
>                class="classpath:org.apache.cocoon.serializer.HTMLSerializer">
>     <param name="doctype-public">-//W3C//DTD HTML 4.0 Transitional//EN</param>
>     <param name="doctype-system">http://www.w3.org/TR/REC-html40/loose.dtd</param>
>     <param name="preserve-space">true</param>
>     <param name="encoding">UTF-8</param>
>     <param name="indent">1</param>
>     <param name="line-width">120</param>
>    </serializer>
> 
>    <serializer type="svg2jpg" mime-type="image/jpg"
>                class="classpath:org.apache.cocoon.serializer.SVGSerializer">
>     <param name="format">jpg</param>
>     <param name="compression-level">80%</param>
>    </serializer>
> 
> Is more in keeping with the spirit of XML.
> 
> This should allow people who want things to be "clean" to be happier
> as more serializers come on the scene.  This is especially important
> as generators and filters probably ought to be able to have parameters
> as well, and this same mechanism could be used for them.
> 
> I'd also suggest that:
> 
>    <param name="format" value="jpg"/>
> 
> be accepted as an alternative to including the data in the element
> (similar to some XSLT constructs).  This is less important than the
> param suggestion above, though.

This is how we do it today and I agree is more XML-ish.

I'm neutral, but I agree that if we do, we should allow equivalence of

 <param name="format">jpg</param>

and

 <param name="format" value="jpg"/>

sort of what RDF does.

Anybody else?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message