Andreas
 
I hear what you are saying  - but the page layout can be
very simple - even in XSL - and easy to display against
sample data with a built-in stylesheet (eg. IE will do this
for you).  Furthermore, even a template-based approach
(such as the sample you sent) will not display the *actual*
page with some sort of processing having taken place.
My feeling is that use of Cocoon must change some aspects
of how you work... if you do not want to change, then maybe
stick to JSP or other template-type systems?
 
Derek

>>> [EMAIL PROTECTED] 03/10/2003 01:54:19 >>>
thanks derek,
 
i'm still not used to cocoon and your example helps!
 
I'm still attracted by the idea, to have a designer, which is responsible for html and programmers who enhance the static html with life data.
if the layout is changing - let the designers do their job. I don't want spend so much time in counting pixels and respect the quirks of every browser.
I'm not sure, if we can expect, that a html designer should know about about xml/xsl. further on there are no tools, to display the XSLT file, so you don't have a quick html-layout control.
- so the seperation is not given anymore.
 
thanks!
andreas
 
----- Original Message -----
Sent: Friday, October 03, 2003 1:11 PM
Subject: Re: html templates - best practise

Andrea
 
I agree that the generator will produce the xml data source
(with the database rows, etc.) - a sample may look like:
 
<?xml version="1.0"?>
<institutionList>
  <institution>
    <institutionName1>testA1</institutionName1>
    <institutionName2>testA2</institutionName2>
  </institution>
  <institution>
    <institutionName1>testB1</institutionName1>
    <institutionName2>testB2</institutionName2>
  </institution> 
</institutionList>
 

Then the XSLT file to transform it might be:
 
<?xml version="1.0"?>
 
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
 
<xsl:template match="/">
  <xsl:apply-templates/>
</xsl:template>
 
<xsl:template match="institutionList">
<html>
<body>
 
<table class="data">
  <tr>
   <th>Name1</th>
    <th>Name2</th>
    <th>&#160;</th>
  </tr>
  <xsl:for-each select="institution">
    <tr>
      <td><xsl:value-of select="institutionName1"/></td>
      <td><xsl:value-of select="institutionName2"/></td>
       <td>&#160;</td>
    </tr>
  </xsl:for-each>
</table>
 
</body>
</html>
</xsl:template>
 
</xsl:stylesheet>
 

The designer can modify the XSLT file to create
different layouts as required...
 
Hope this helps.
 
Derek

>>> [EMAIL PROTECTED] 03/10/2003 12:30:06 >>>
Thanks derek,
 
that was exactly what I like to know.
i will give you an example:
 
this is an tapestry html template:
<html>
<body>
 
<table class="data">
  <tr>
   <th>Name1</th>
    <th>Name2</th>
    <th>&nbsp;</th>
  </tr>
 <tr jwcid="@Foreach" source="ognl:institutionList" value="ognl:institution" element="tr">      // iteration over database rows

        <td><span jwcid="@Insert" value="ognl:institution.institutionName1"/></td>                           /
       <span jwcid="@Insert" value="ognl:institution.institutionName2"/></td>

 </tr>
</table>
 
</body>
</html>
 
this template can be modified by a html designer at any time during development!
If i get a hit on this page, I read the records from the database and tapestry will bind the data. You may not be familiar with tapestry, but i hope this example is easy to guess.
 
My idea with cocoon was:
The generator will produce the xml data source (with the database rows, etc.) and during transformation I would like to reference to the template file and bind the dynamic data.
 
 
andreas
 
----- Original Message -----
Sent: Friday, October 03, 2003 11:30 AM
Subject: Re: html templates - best practise

Andreas
 
Not sure I fully understand  - and so  I may be missing the point
completely... but Cocoon, unlike many other web application
systems does *not* work on a "template" system ... data is
created in XML (from static and/or dynamic sources) and the
presentation (HTML page layout) is handled via XSLT - it is
likely that you & the designer need to agree as to what parts
of his/her layout need to be encapsulated into the XSLT code
and which parts will be created dynamically via Cocoon
 
Hope this helps - if not, you may have to supply some more
concrete examples of what you are trying to achieve.
 
Derek

>>> [EMAIL PROTECTED] 03/10/2003 11:21:06 >>>
Hi,
 
i read a lot of tutorials and docs about cocoon and i really like it, but I still don't know, what's the best practise to handle html templates.
 
I get the static part of my html page from a html designer and I want to leave it untouched, so the designer can modify it later on. Of course, some place holders and template instructions should be in there, to put the dynamic part into the right place.
 
maybe this strict seperation( html design <-> java/xml programming) is against the philosophie of cocoon, because I understand:
all required data (static+dynamic) should be put in the xml datasource with the generator and during the transformation process this data will be mixed with html(or wap or pdf) language specific parts.
 
so, how do you handle this?
any suggestions/comments are welcome!!
 
thanks very much
Andreas
 

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.

Reply via email to