|
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:template match="/">
<xsl:apply-templates/> </xsl:template> <xsl:template
match="institutionList">
<html> <body> <table class="data"> <tr> <th>Name1</th> <th>Name2</th> <th> </th> </tr> <xsl:for-each select="institution"> <tr> <td><xsl:value-of select="institutionName1"/></td> <td><xsl:value-of select="institutionName2"/></td> <td> </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> </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
-- 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. |
- Re: html templates - best practise gounis
- Re: html templates - best practi... Andreas Bohnert
- Re: html templates - best practise gounis
- Re: html templates - best practise Andreas Bohnert
- Re: html templates - best practise Andreas Hartmann
- Re: html templates - best practise Andreas Bohnert
- Re: html templates - best practise Alexander Schatten
- Re: html templates - best practise Derek Hohls
- Re: html templates - best practise Andreas Bohnert
- Re: html templates - best practise Joerg Heinicke
- Re: html templates - best practise Derek Hohls
- Re: html templates - best practise Andreas Bohnert
- Re: html templates - best practise Derek Hohls
- Re: html templates - best practise Bertrand Delacretaz
- Re: html templates - best practise Andreas Hartmann
- RE: html templates - best practise Conal Tuohy
- Re: html templates - best practise Derek Hohls
- Re: html templates - best practise Derek Hohls
- Re: html templates - best practise Andreas Hartmann
- Re: html templates - best practise gounis
