cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Geraghty <>
Subject Re: Best Way to Build a "Traditional" Website Structure Using Coc oon?
Date Fri, 09 Apr 2004 15:17:27 GMT
You can use the DOCTYPE switch in the HTML to bring internet explorer 
and mozilla browsers together when using CSS positioning, our intranet 
site supports IE, Mozilla and Firefox using only one stylesheet.

For details try:

If you are in a rush try:

Russell Geraghty

Leon Widdershoven wrote:
> I have found that supporting multiple browser is a nightmare when using
> CSS. You need to have the test results of all supported browser at hand,
> or you will forget something.
> If you test on Mozilla, you will be shocked when viewing the results
> on IE6, if you develop for IE6 you get problems with IE5.5. Safest bet
> is to develop for IE5.5 (simplest CSS) and then test on mozilla (which is
> pretty conformant).
> Tables still are the safest bet. You can do quite a lot with XSL concerning
> dynamic formatting, if you wish.
> I reverted a CSS based set of pages to XSL formatted pages (with only 
> simple
> CSS) just because I had to support IE5.5, IE6 and of course Mozilla and
> Konqueror.
> Also don't try to dynamically format contents using client-side 
> javascript, unless you are a true JS wizard or support a single browser.
> My lesson is: stick to HTML, IE can handle that. As a side note: Don't 
> use PNG with transparancy, IE can't handle that.
> As a hint for your other problem I can show an edited part of my code. 
> This is
> indeed only one of the ways (the pages were xsp) -another way is with 
> the JXTemplate generator or transformer.
> This code is called with something like something like
> <pipeline-list>
>     <pipeline-entry>
>         <Company>Foo</Company>
>         <Address>Bar</Address>
>     </pipeline-entry>
>     <pipeline-entry>
>         <Company>Foo2</Company>
>         <Address>Bar2</Address>
>     </pipeline-entry>
> </pipeline-list>
> And the templates are:
>     <xsl:template match="pipeline-list">
>     <xsl:choose>
>         <xsl:when test="count(pipeline-entry)=0">
>         <!-- We don't have entries in this table - don't display 
> table         -->
>         <b>No Results</b>
>         </xsl:when>
>         <xsl:otherwise>
>     <table border="1" cellspacing="5" cellpadding="2" rules="all" 
> width="100%">
>         <tr>
>         <th>
>             Company
>         </th>
>         <th>
>             Address
>         </th>
>         </tr>
>         <xsl:apply-templates/> <!-- These are the cells -->
> <!-- Example of selecting a node: These are totals appearing at the 
> bottom -->
>                 <th><xsl:value-of select="total/TQA"/> <
>                 </th>
>                 <th><xsl:value-of select="total/TWQA"/>
>                 </th>
>                 <th>
>                 </th>
>         </tr>
>     </table>
>     </xsl:otherwise>
> </xsl:choose>
>     <xsl:template match="pipeline-entry">
>     <tr>
>         <td>
>         <xsl:value-of select="Company"/>
>         </td>
>         <td>
>         <!-- Have a match="Address" somewhere -->
>         <xsl:apply-templates/>
>         </td>
>     </tr>
>  </xsl:template>
> Schultz, Gary - COMM wrote:
>> Have you considered cascading style sheets (css) for layout instead of
>> tables. I'm using that for my web sites and I think it tends to simplify
>> things. Use Cocoon to build the html element structure and css to 
>> layout the
>> web page. This way you do not have to worry about getting the different
>> parts of the page in the correct table layout element. The basic 
>> layout of
>> our Commerce Housing website at is css
>> based.
>> Gary T. Schultz
>> Web Technical Administrator / GIS Coordinator
>> Wisconsin Department of Commerce
>> 6th Floor
>> P.O. Box 7970
>> Madison, WI 1-608-266-1283
>> -----Original Message-----
>> From: David Swearingen []
>> Sent: Thursday, April 08, 2004 5:04 PM
>> To:
>> Subject: Best Way to Build a "Traditional" Website Structure Using
>> Cocoon?
>> Newbie question:  I am designing a dynamic website and have chosen
>> Cocoon as the architecture.  The website will contain a 'classic'
>> structure, with left navigation, masthead, footer, and a body section
>> containing content.  The various elements, like the navigation,
>> surrounding the content will rarely change of course.  I will define
>> these in XML.  So there will be a leftnav.xml, masthead.xml,
>> footer.xml.  In a typical website like this the whole thing is in an
>> html table, and the top row of the table contains the masthead, a left
>> cell contains the navigation, the right cell contains the body text,
>> and the bottom row contains the footer.  Very straightforward, done all
>> the time.  I've built numerous sites like this with Struts and other
>> tools.
>> Now imagine the request comes for a page, like faq.html.  I know how to
>> make Cocoon grab faq.xml and run it through a XSL transformer to add
>> the html markup and then serialize it out.  Done this already.
>> But for my website I need to generate the entire table context for the
>> page, then insert the masthead html, then there's more html that closes
>> the table cell and opens a new one, generates the left navigation html
>> from leftnav.xml, closes the cell, spits out my content from faq.xml,
>> etc., you get the picture.
>> Ideally I want my page structure html -- the code that defines the
>> overall page table that holds all the elements -- in one file, and the
>> masthead, navigation and footer in their own files, and then of course
>> the content documents are in their respective xml files.  This makes
>> for easy site maintenance.
>> So what's the best way to do this in Cocoon?  It seems it could be
>> accomplished in numerous ways, but I have a feeling there's a
>> best-practice here.
>> Thanks,
>> David
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Small Business $15K Web Design Giveaway 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message