You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Sean Fulton <fu...@cmu.edu> on 2005/05/04 16:06:38 UTC

How are you doing templates?

I'm curious as to how others are doing templates for subsections of 
their site to vary the style and some content.  I was going to do 
custom resource types but the howto suggests that's not appropriate and 
I can see why. How do you do it? Custom pipelines? Logic within the an 
XSLT?

Thanks,

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Michael Wechner <mi...@wyona.com>.
Lee Carroll wrote:

>
> What are the draw backs of custom doc types ?


If you have clear structures and hence a clear reason for specific doctypes,
then there are no drawbacks ;-)

But the question is what is "clear"?! For instance a press release might 
have a
title, an issued date and paragraphs (min=0 max=unlimited).

You could either do your XML as follows:

<pr>
  <title>...</title>
  <date>....</date>
  <para>...</para>
</pr>

or

<html>
  <body>
    <div id="date">...</div>
    <div id="title">...</div>
    <p>...</p>
  </body>
</html>

Now the PR people suddenly say let's insert tables ....

I think it depends very much on where you want to go to and
what the output formats are going to be, etc. ....

Michi

>
> Lee C
>
>
>
> ----- Original Message ----- From: "Sean Fulton" <fu...@cmu.edu>
> To: <us...@lenya.apache.org>
> Sent: Wednesday, May 04, 2005 3:06 PM
> Subject: How are you doing templates?
>
>
>> I'm curious as to how others are doing templates for subsections of 
>> their site to vary the style and some content.  I was going to do 
>> custom resource types but the howto suggests that's not appropriate 
>> and I can see why. How do you do it? Custom pipelines? Logic within 
>> the an XSLT?
>>
>> Thanks,
>>
>>    Sean
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Lee Carroll wrote:

> who's other data format should we use ? if a standard exists, sure but 
> we're talking individual web content. Each customer has percived unique 
> goals and messages to get across. what are the costs of maintaining 
> these doc types ?

it's a bit like all those institutions that claim to have unique 
workflow needs and subsequently paint themselves into a corner by 
customizing a product to death..

a better approach in many cases is a microcontent format that leverages 
xhtml. http://www.google.com/search?q=microcontent

to stay with your example, you'd make good use of the class attribute 
and define a fixed number of values

<h1>Lunch Menu</h1>
<b class="meal">soup</b><p class="price">£10</p>
<b class="meal">pot noodle</b><p>£1</p>
<b class="meal">fish pie</b><p  lass="price">£5</p>

or even

<b class="meal" id="soup1">tomato soup</b><p class="price">£10</p>

.. you get the idea.

you'd also not use b in the above structure, but that's beside the point.

benefits:

* you get reasonable default rendering without doing anything
* the format is useful even without a xsl transform
* works with existing tools (dreamweaver anyone?)
* allows you to rely on well-understood semantics (p, li, etc)


> How can we guide a content editor that a menu must always have a price 
> when they add a dish element etc. This bottom up information 
> architecture allows each content type to be validated against the goals 
> and needs of the page / site. The content authors are restricted /helped 
> in what content is allowed and appropriate. Editing becomes very easy. 
> (Actually I'm over egging the pudding here as its quite easy to produce 
> confusing content structures which are awful to edit, anyway)
> 
> To continue with our food theme, garlic bread and doc types, its the 
> future.

arguably for most applications, a lightweight approach as above is enough.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Lee Carroll <le...@aol.com>.
Hello Gregor,

I'm playing devils advocate a little but I really can't see much of a 
problem

> the biggest one: you are maintaining your own data formats, with all it's 
> associated costs.

who's other data format should we use ? if a standard exists, sure but we're 
talking individual web content. Each customer has percived unique goals and 
messages to get across. what are the costs of maintaining these doc types ?

> you'd be well advised to ponder whether you might get away by extending 
> xhtml and reusing it's basic building blocks.

a paragraph is a paragraph. a h1 is a h1. I can't see how these can be 
extended to mean anything.

A restuarants menu could consist of:

<h1>Lunch Menu</h1>
<b>soup</b><p>£10</p>
<b>pot noodle</b><p>£1</p>
<b>fish pie</b><p>£5</p>

but only a schema can describe the elements of "menu type" , "dish" , 
"price", and the relationships and constraints between each element. The 
xhtml dtd has nothing to say on the meaning of our restaurants menu.

How can we guide a content editor that a menu must always have a price when 
they add a dish element etc. This bottom up information architecture allows 
each content type to be validated against the goals and needs of the page / 
site. The content authors are restricted /helped in what content is allowed 
and appropriate. Editing becomes very easy. (Actually I'm over egging the 
pudding here as its quite easy to produce confusing content structures which 
are awful to edit, anyway)

To continue with our food theme, garlic bread and doc types, its the future.

Lee C





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Lee Carroll wrote:

> What are the draw backs of custom doc types ?

the biggest one: you are maintaining your own data formats, with all 
it's associated costs. you'd be well advised to ponder whether you might 
get away by extending xhtml and reusing it's basic building blocks.




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Lee Carroll <le...@aol.com>.
Hello,
 For a set of new sites we are going down the route of custom doc types. 
(For good or bad) What is worrying
is that I can't actually see any reason why custom doc types are a bad 
thing.

The benifits are quite big:
content is stored with a semantic structure (xhtml outside of a browser is 
meaningless)
easier content re-use (although I've singularly failed to get that goose to 
lay that particular golden egg)
better searching (possibly even auto updating of content but again that 
could be pushing it)
content is classified much better / easier, leads (and it seems it really 
is) to a cleaner IA
we are also hoping to push content translation and the problem of context 
can only be solved with semantic xml (not sure perhaps?)

What are the draw backs of custom doc types ?

Lee C



----- Original Message ----- 
From: "Sean Fulton" <fu...@cmu.edu>
To: <us...@lenya.apache.org>
Sent: Wednesday, May 04, 2005 3:06 PM
Subject: How are you doing templates?


> I'm curious as to how others are doing templates for subsections of their 
> site to vary the style and some content.  I was going to do custom 
> resource types but the howto suggests that's not appropriate and I can see 
> why. How do you do it? Custom pipelines? Logic within the an XSLT?
>
> Thanks,
>
>    Sean
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Michael Wechner <mi...@wyona.com>.
Sean Fulton wrote:

>
> Ah, thanks. I hadn't thought of adding the pipeline there. Is there a 
> naming convetion for the xslts in this case? If it's a new doctype, 
> you would name it 'page2xhtml-doctype.xsl.'  But what about if you're 
> just doing this pipeline? Or does it not really matter what you call it?


it doesn't really matter, whereas it does matter if you actually do it 
as a doctype
as you noted above

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Sean Fulton <fu...@cmu.edu>.
On 2005-05-04 11:47:13 -0400, Michael Wechner <mi...@wyona.com> said:

> Sean Fulton wrote:
> 
>> I'm curious as to how others are doing templates for subsections of 
>> their site to vary the style and some content.  I was going to do 
>> custom resource types but the howto suggests that's not appropriate and 
>> I can see why. How do you do it? Custom pipelines?
> 
> 
> yes. In the case of the default publication I would add additional pipelines to
> doctypes.xmap, whereas the matcher can depend on the URL pattern or 
> doctype of whatever.

Ah, thanks. I hadn't thought of adding the pipeline there. Is there a 
naming convetion for the xslts in this case? If it's a new doctype, you 
would name it 'page2xhtml-doctype.xsl.'  But what about if you're just 
doing this pipeline? Or does it not really matter what you call it?

> 
>> Logic within the an XSLT?
> 
> 
> I wouldn't recommend that, because in the long run it will lead into a 
> nightmare ;-)
> whereas for little stuff it might make sense, but normally this little 
> ones tend
> to grow ...

Yeah, I was starting to go this way. The more I started doing like this 
the more I realized how convoluted it would get.

Thanks for the help,

	Sean

> 
> HTH
> 
> Michi
> 
>> 
>> Thanks,
>> 
>>     Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: How are you doing templates?

Posted by Michael Wechner <mi...@wyona.com>.
Sean Fulton wrote:

> I'm curious as to how others are doing templates for subsections of 
> their site to vary the style and some content.  I was going to do 
> custom resource types but the howto suggests that's not appropriate 
> and I can see why. How do you do it? Custom pipelines? 


yes. In the case of the default publication I would add additional 
pipelines to
doctypes.xmap, whereas the matcher can depend on the URL pattern or 
doctype of whatever.

> Logic within the an XSLT?


I wouldn't recommend that, because in the long run it will lead into a 
nightmare ;-)
whereas for little stuff it might make sense, but normally this little 
ones tend
to grow ...

HTH

Michi

>
> Thanks,
>
>     Sean
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org