cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Re: [RT] the quest for the perfect template language
Date Fri, 04 Apr 2003 02:15:30 GMT
On 4/4/03 1:33, "Robert Koberg" <rob@koberg.com> wrote:

> Hi,
> 
> I going to snip alot because I wholeheartedly agree with most everything you
> wrote.

Pleased to hear that...

>> -----Original Message-----
>> From: Pier Fumagalli [mailto:pier@betaversion.org]
>> Sent: Thursday, April 03, 2003 3:03 PM
> <snip/>
>> Again, my graphic team knows only HTML, they don't want to think about how
>> the data is organized in the back, they could care less (as I could care
>> less about their CSSes).
> 
> This is where I think developers make a big mistake (caring less about CSS).
> As demonstrated by Stefano with his thumbnail XSLT, lack of thinking about
> the larger picture in the 'design-space' makes things much more difficult. I
> would bet that many cocooners could get rid of a great deal of their XSLT
> line-count/complexity if they truly understood how XSLT co-exists with CSS.
> 
> You're right that designers won't be able to do it. That is why you have to
> do it. They give you a Photoshop mockup and you take it from there.

Literally, I cannot keep up with the volume of pages produced by out
6-people team, I barely can keep up with the rest of the stuff (servers,
java, apache, oracle, xml-feeds, business logic and integration).

Unfortunately, right now, with JSPs, they do it, they are PERFECTLY able to
stand on their feet and do the whole kit-and-caboodle. It is a template,
driven by the "content-aggregating" HTML-like page, and not an action driven
transformation sheet, when one has to think about what is and where in the
source...

If they gave me empty "shells" of HTML, and then I had to put things here
and there to make the page work allright, every time someone makes a change
to the page, it literally has to come back to me, I have to review it, edit
it, and put it live... This is "aggregation of concerns" unfortunately...

<note>
  This is _my_ situation, with the resources _I_ have available, I don't
  want to imply that everyone else has the same problematic I have. Given
  the current economic season, we cannot hire someone skilled with XSLT, so,
  only thing I can do is think about how to make things work...
</note>

> <snip/>
>> 
>> I could write something like:
>> 
>> <HTML template:article="source:/article">
>>   <HEAD>
>>      <TITLE>{article:title}</TITLE>
>>    </HEAD>
>>    <BODY>
>>      <H1>{article:title}</H1>
>>      <P tmpl:author="{cocoon:/data/authors/{@author}}/author">
>>        Author:
>>        <A href="mailto:{author:email}">{author:name}</A>
>>      </P>
>>      {article:body}
>>      <DL>
>>        <DT>Other top news from us</DT>
>>        <template:foreach context="topnews:/related/articleref">
>>          <DL>
>>            <A href="/news/{context:@id}">{context:title}</A>
>>          </DL>
>>        </template:foreach>
>>    </BODY>
>> </HTML>
>> 
> 
> This looks like a very simple XSLT, using the document function...

I know, but to some extent is much more "HTML editor" friendly, as it
doesn't have tags (that dreamweaver keeps ignoring and not displaying as a
preview). At least with curly braces it shows something in the preview.

When I red about your "<empty/>" document superhack, I have to admit, I have
done roughly the same as a show-off testcase. I aggregated all the possible
content that could have gone on my article page (total of some 50/60 kb of
XML), created an XSLT based on a "wget" copy of our news page (one only
matcher in the template, for "/"), replaced the pieces I wanted to replace
with some xpath, and that was done... But far from easy and optimal and
beautiful... It was a nasty hack...

    Pier


Mime
View raw message